Operating System - HP-UX
1753873 Members
7591 Online
108809 Solutions
New Discussion юеВ

Add new user with password

 
Eblyn Solis
Honored Contributor

Add new user with password

Hi,

I want to add new user in HPUX 11.11 but I want to assing the password from commaand line without user input.

Please assign a kudo to this post, if you find it useful.
7 REPLIES 7
Tingli
Esteemed Contributor

Re: Add new user with password

Yes, you can. There is some command as passwd.sam does the trick.
Jeff_Traigle
Honored Contributor

Re: Add new user with password

You must have the password hashed already.

/usr/sam/lbin/usermod.sam -p hashedpasswd

Although useradd.sam states it has this option, I seem to recall it didn't work. Maybe it was fixed in a patch somewhere along the way, however.
--
Jeff Traigle
Tingli
Esteemed Contributor

Re: Add new user with password

Yes. The encrypted password is from /etc/shadows.
James R. Ferguson
Acclaimed Contributor

Re: Add new user with password

Court Campbell
Honored Contributor

Re: Add new user with password

If I remember correctly, the commands won't work with trusted systems.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Javed Khan_1
Valued Contributor

Re: Add new user with password

Hi,

if you have expect installed on your system you can assign password to user using command

autopasswd username newpassword

Regards,
Javed
Never Give Up
Eblyn Solis
Honored Contributor

Re: Add new user with password

Thanks for your help
Please assign a kudo to this post, if you find it useful.