if I want to create a bundle of user ids on some aix servers, if there is a way not need to do "passwd username" one by one user to set the password?
Thanks
if I want to create a bundle of user ids on some aix servers, if there is a way not need to do "passwd username" one by one user to set the password?
Thanks
Is the chpasswd
tool available on your system?
Yes, there is a way
I am assuming you are using your NIM server to create the user on multiple servers.
I am not sure if you are using a script or manually ssh'ing to each host and creating the user.
Its little tricky but it works,
Say you want the password to be abc123 (an user can change after 1st login), and you created the user (say user1) on server1, what you do now is on server1
passwd user1 --> type in abc123 (twice)
now
cat /etc/security/passwd | grep -p user1
user1:
password = XXXXX
lastupdate = 1387815793
Now you will copy the password (XXXXX) (ofcourse it is not xxxx, but encrypted password), and from NIM you can add a new line to your script below mkuser command
echo "user1:XXXXX" |chpasswd -e -f ADMCHG
This will have the same password as abc123 on all the server you run the script for that user.
You will set a password and it is changeable 1st time the user login.
Note: user1 is the example I am using for user
You can also try this, i do it in my env..
mkuser gecos="USER details" id= username
echo "username:password" >>/pass.txt
cat pass.txt | chpasswd
usermod -G groupname username
Example:
mkuser gecos="Sandeep Kumar - IBM-Application " id=571 ibm075
echo "ibm075:test@123" >>/pass.txt
cat pass.txt | chpasswd
usermod -G App_Adm ibm075
For Multiple serves, use Key less fingerprint SSH.
Thanks,
thala