cancel
Showing results for 
Search instead for 
Did you mean: 

non-interactive passwd.

 
SOLVED
Go to solution
Highlighted
Frequent Advisor

non-interactive passwd.

All
Does anyone know if it is possible to create a user account and passwd using the command useradd. I want to create a login ID for several users across over 200 systems and I wanted to use this command to run it across all the systems from a single system in a loop. I know I can create a user ID but I am defeated to create a passord and I want it to expire immediately... Any Ideas ??????
2 REPLIES 2
Highlighted
Honored Contributor

Re: non-interactive passwd.

Highlighted
Respected Contributor
Solution

Re: non-interactive passwd.

go into sam and add a test user. set the password you want to use for your real user. then use the samlog_viewer to see the command that was executed - it's called "useradd.sam". It's basically the same as the useradd command, but with an additional parameter to specify the encrypted password. find the encrypted password that was set for your sample user from the log.

to run this command on 200 systems, you'll probably want to set up a key-based ssh trust (or rlogin/remsh/.rhosts, if you don't care about security), so that you can execute remote commands.

if you want to expire the password, you'll also need to run "passwd -f " (or the corresponding "modprpw" command if running trusted systems).