The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-21-2006
modgil modgil is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 3
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 ?