Thursday, December 29, 2011

How to change user password on Linux/Solaris and also see password policy

1. Password change and password policy on Linux

a. To change the user pw, at the prompt, use password command followed by user id.
# passwd bhusal # you have to enter password twice.

b. force password change upon first login,
# chage -d 0 bhusal # -d is for days, so 0 (zero) means today, right now.

c. Check the following files for passowrd policies.

# more /etc/login.defs # for Password aging info
# more /etc/pam.d/system-auth # for pw length, case info.


2. Password change and password policy on Solaris.

a. To change the pw, use the passwd command followed by userid
# passwd bhusal

b. Force the password upon first login.
# passwd -f bhusal # -f will force password to change upon first login.

c. For password policy, check the following two files,


d. If there is an issue with login, you can also check the following files,

/etc/shadow (account locked?)

e. Also check,

No comments:

Post a Comment