09-28-2006
I want to use it in a script without my interaction. I want to provide new password in a script a than run passwd to change user password.
Problem of using passwd in shell script is that passwd requires user interaction to change password and script stops. My question was is there a way to use passwd without interaction or is there other way to change password using shell script
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I have a shell script in which I need to switch user and execute some commands and then come back to the original user. To make it more clear -
I have to log in as user xxx (this user is not root)- then 'su' to yyy - execute a script called zzz - then logout to xxx.
The problem I am... (2 Replies)
Discussion started by: unique
2 Replies
2. Shell Programming and Scripting
I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool).
But I would like to know why passwd command isnt working in scripts? (1 Reply)
Discussion started by: Deepa
1 Replies
3. Shell Programming and Scripting
Hello *nix users,
I'm wondering if there's a way to change a user's default shell in /etc/passwd to the telnet program along with some parameters.
For instance:
user:x:1001:1001::/home/user:/usr/bin/telnet localhost 12345
The above line in the /etc/passwd file gives the following error... (2 Replies)
Discussion started by: tux0084
2 Replies
4. Red Hat
I accidentally changed root shell from /bin/bash to bash in /etc/password, then logged out from root. Now I can't login as root and got "No shell" error, although I have root password. "su -f -s /bin/bash" command does NOT work. There is no GUI interface for this system.
My question: Do I have... (7 Replies)
Discussion started by: aixlover
7 Replies
5. Solaris
Hi Folks,
I have Solaris 10, latest release.
We have passwd aging set in /etc/defalut/passwd.
I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging.
When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies
6. Shell Programming and Scripting
Hi All,
I wanted to write a shell script which will change the expired passwd in oracle. Here is below what I am trying,
#!/bin/sh
set -x
ORACLE_HOME="/optware/oracle/9.2.0.2_64"
SQLPLUS="${ORACLE_HOME}/bin/sqlplus"
PASS="xyz"
PATH=$ORACLE_HOME/bin:$PATH... (0 Replies)
Discussion started by: gr8_usk
0 Replies
7. AIX
Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies
8. Shell Programming and Scripting
Hi,
i have one shell script which transfers files from one server to other server through FTP, but i can see login id and password is not mentioned.
kindly help to understand the script.then how below script is working if login and password is not mentioned in script
#!/bin/sh... (1 Reply)
Discussion started by: ni3b007
1 Replies
9. Shell Programming and Scripting
Hi All, Wishes!!
I need some help to prepare a script to copy the public key from admin host to multiple client hosts to make them login without password.
Detailed :
I have an admin host "admin1" and i generated sshkeygen, now i have id_rsa.pub and i have around 50 client hosts. i... (4 Replies)
Discussion started by: kumar85shiv
4 Replies
10. UNIX for Advanced & Expert Users
did a big mistake, changing root entry of /etc/passwd to
root:x:0:0:root:/root:/usr/bin/tmux split-window -v \; attach
as expected, now I can't login as root anymore. sudo ed /etc/passwd etc. doesn't work.
Any idea?
Use code tags to increase readability and follow the rules. (4 Replies)
Discussion started by: dodona
4 Replies
LEARN ABOUT CENTOS
vncpasswd
vncpasswd(1) Virtual Network Computing vncpasswd(1)
NAME
vncpasswd - change the VNC password
SYNOPSIS
vncpasswd [passwd-file]
vncpasswd -f
DESCRIPTION
vncpasswd allows you to set the password used to access VNC desktops. Its default behavior is to prompt for a VNC password and then store
an obfuscated version of this password to passwd-file (or to $HOME/.vnc/passwd if no password file is specified.) The vncserver script
runs vncpasswd the first time you start a VNC desktop, and it invokes Xvnc with the appropriate -rfbauth option. vncviewer can also be
given a password file to use via the -passwd option.
The password must be at least six characters long (unless the -f command-line option is used-- see below), and only the first eight charac-
ters are significant. Note that the stored password is not encrypted securely - anyone who has access to this file can trivially find out
the plain-text password, so vncpasswd always sets appropriate permissions (read and write only by the owner.) However, when accessing a
VNC desktop, a challenge-response mechanism is used over the wire making it hard for anyone to crack the password simply by snooping on the
network.
OPTIONS
-f Filter mode. Read a plain-text password from stdin and write an encrypted version to stdout. Note that in filter mode, short or
even empty passwords will be silently accepted.
FILES
$HOME/.vnc/passwd
Default location of the VNC password file.
SEE ALSO
vncviewer(1), vncserver(1), Xvnc(1) vncconfig(1),
http://www.tigervnc.org
AUTHORS
Tristan Richardson, RealVNC Ltd.
Antoine Martin
D. R. Commander
VNC was originally developed by the RealVNC team while at Olivetti Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were
implemented by Constantin Kaplinsky. Many other people participated in development, testing and support.
TigerVNC 09 Jul 2010 vncpasswd(1)