Operating System - HP-UX
1758824 Members
2884 Online
108875 Solutions
New Discussion юеВ

Adding users with trusted systems

 
SOLVED
Go to solution
Steven E. Protter
Exalted Contributor

Re: Adding users with trusted systems

useradd.sam is just some internal sam program that does the same job as useradd.

use useradd, Bill Hassel's program and as they say in Siberia, "Your'e Done"

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mic V.
Esteemed Contributor

Re: Adding users with trusted systems

To clarify, the program I wrote actually set the password by (carefully!) modifying the passwd file once the account had been created.
What kind of a name is 'Wolverine'?
Travis Harp
Advisor

Re: Adding users with trusted systems

The password is now working, thanks everyone.

One last thing remains, I would like to have these accounts created with an expired password so the user is forced to change the password on first log in.

How would I go about that on the command line?
Eagles may soar but weasels don't get sucked into jet engines.
Sridhar Bhaskarla
Honored Contributor

Re: Adding users with trusted systems

Hi,

You will need to pay attention to makekey while creating the encrypted password. makekey will accept exactly 10 chars with first 8 being the password. The last two chars are called salt and they can be arbitrary. For ex., to create the encrypted password for "test1234" I would use the following

echo "test1234xy" |/usr/lib/makekey

Here xy can be anything.

Try it and it should work.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Adding users with trusted systems

Hi,

command line to force the user to change his/her password is 'passwd -f user'.

Man 'passwd' for more information.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Travis Harp
Advisor

Re: Adding users with trusted systems

I'm almost there but now I'm having a problem with the accounts saying that the password is expired and it's not allowing the user to set the password.

Last successful login for : Mon Jan 26 15:31:39 CST6CDT 2004
Last unsuccessful login for : NEVER
Your password has expired.
su: Password for has expired. Choose new password and try again
su: Sorry

It's acting like the password life time has expired.

I can go into sam and reset the password age to zero and it works fine.

Is there a command line way to set the password age to zero?
Eagles may soar but weasels don't get sucked into jet engines.
Bill Hassell
Honored Contributor

Re: Adding users with trusted systems

/usr/lbin/modprpw -e user_login_name

The man page is missing on 11.0 and earlier systems but it's there for 11.11 and later. Get a copy from docs.hp.com (and also get getprpw, lots of useful info)


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Adding users with trusted systems

Almost forgot: using su to login to an expired account will give you that exact behavior. You must login normally (ssh or telnet) to change the password.


Bill Hassell, sysadmin