How can I request user to change his password upon login after I reset his account in Solaris 10?
Asked
Active
Viewed 1.3k times
2 Answers
4
In Solaris 10 you can use passwd -f <username>
command to do this if you are using the files or nisplus repositories.
Manpage here
# passwd -f user2
passwd: password information changed for user2
At next login user2 will get this.
Connected to localhost.
Escape character is '^]'.
login: user2
Password:
Choose a new password.
New Password:
1
After you reset the password using passwd
edit the /etc/shadow
and set the date for the password to 0. The user has to change his password after typing in the current one which you set by using passwd
.
An example for a password with 0 day durability:
cw:o368bqRZm2WW6:0::::::
The zero in the third column says that the password never has changed and with normal security policy settings the user will get something like this after login.
# ssh cw@someserver
Password:
Warning: Your password has expired, please change it now.
New Password:
Let me know if it worked for you.
![](../../users/profiles/25202.webp)
chrw
- 1,041
- 5
- 11