Quote:
|
Originally Posted by thestevew
The password in /etc/shadow is encrypted. To add/change a password, use the passwd command (see the man pages for options).
cheers
|
Passwd command works in Interactive mode and I cant use expect also. I just want to hard code users and there password in one script.
# To add the users into /etc/password file
for a_user in nortel admin netmgr master operator ttbuser orbix oracle
do
/usr/sbin/useradd $a_user
done
This will add the users into /etc/password and /etc/shadow file. But how can I add passwords into shadow file withought using expect and in non Interactive mode ?