1834905 Members
2671 Online
110071 Solutions
New Discussion

login script

 
CubanitaTechDiva
Occasional Advisor

login script

Hi! I'm trying to develop a script to create a user login and create a default password for this login that the user will be forced to change the first time they log in. I can create the login, but need help with setting up the expiring password from within a script. Please advise, and thanks!
3 REPLIES 3
Wilfred Chau_1
Respected Contributor

Re: login script

add these to your script,

passwd -d
passwd -f


The first line will remove the "*" from the password field and the second line will force the user to enter a new password.
Seth Parker
Trusted Contributor

Re: login script

Gloria,

If you've already got the account created, the man page for passwd seems to say you could use the -x and -f options to set expiration (in days) and immediately force the user change the password.

Try something like:

passwd
passwd -x -f

Good Luck!
Seth
Dario_1
Trusted Contributor

Re: login script

Hi Gloria:

Check this out. It was posted yesterday:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x39279607df6ed711abdc0090277a778c,00.html

Regards,

DR