Operating System - HP-UX
1834758 Members
3321 Online
110070 Solutions
New Discussion

Re: what command shold be used to create user id with password change request at first login

 
SOLVED
Go to solution
Pradeep_3
Frequent Advisor

what command shold be used to create user id with password change request at first login

what command shold be used to create/modify user id with the password change request at first login, My system is already in Truted mode.

Thanks you in advance..
9 REPLIES 9
Robert-Jan Goossens_1
Honored Contributor

Re: what command shold be used to create user id with password change request at first login

# passwd -f user

Force user to change password upon next login by expiring the current password.

Regards,
Robert-Jan
Pradeep_3
Frequent Advisor

Re: what command shold be used to create user id with password change request at first login

Instead of asking new password it give following output, Can you please give me exact systex so that it will ask to hange user password on first login.

Last successful login for test123: Fri Jan 21 10:54:23 GMT0BST 2005
Last unsuccessful login for test123: Fri Jan 21 10:52:18 GMT0BST 2005 on pts/1
Your password has expired.
su: Password for test123 has expired. Choose new password and try again
su: Sorry
Peter Leddy_1
Esteemed Contributor

Re: what command shold be used to create user id with password change request at first login

Hi,

Create the user as you normally would when you add a user and then as Robert-Jan says do "# passwd -f username" and then the user will be required to enter a new passwd at their first login.

Regards,

Peter
Peter Godron
Honored Contributor

Re: what command shold be used to create user id with password change request at first login

Or if you are using SAM there is an option to make the password valid until first logon. This will then force the user to change pwd after the first login.
Regards
Peter Leddy_1
Esteemed Contributor

Re: what command shold be used to create user id with password change request at first login

Hi,

Sorry, you will have to assign a password when you create the user and then supply it to the user so they can change it.

Regards,

Peter
Pradeep_3
Frequent Advisor

Re: what command shold be used to create user id with password change request at first login

Peter,

I tried the same. I created user with a specific password. then I ran passwd -f loginid command. And then tried logging with that id again. Upon giving old password, it gives following,

$ su - test123
Password:
Last successful login for test123: Fri Jan 21 10:54:23 GMT0BST 2005
Last unsuccessful login for test123: Fri Jan 21 10:52:18 GMT0BST 2005 on pts/1
Your password has expired.
su: Password for test123 has expired. Choose new password and try again
su: Sorry
Peter Godron
Honored Contributor
Solution

Re: what command shold be used to create user id with password change request at first login

Pradeep,
try without the su command.
So log on via telnet as the user test123
Anty difference?
Pradeep_3
Frequent Advisor

Re: what command shold be used to create user id with password change request at first login

Pradeep on telnet its working fine..
Pradeep_3
Frequent Advisor

Re: what command shold be used to create user id with password change request at first login

Using "passwd -f loginid" resolved my problem