全部博文(113)
分类:
2009-12-04 12:27:02
客户端登录Unix时总是要求重置密码
当root用户执行passwd设置某个用户的密码后,会默认自动在/etc/security/passwd文件中的flags参数中增加ADMCHG值。这种情况下,在下次登录时你必须重置密码。内容如下:
oskiss:
password = **********
lastupdate = **********
flags = ADMCHG
而如果在flags中增加NOCHECK值,那么在下次登录时将不必再重置密码。
1、修改登陆用户密码重置方式,执行“# pwdadm -f NOCHECK oskiss”。
2、检查/etc/security/passwd文件中oskiss用户的flags参数的取值是否已经增加NOCHECK值。
3、重新login或者su测试是否生效,OK。
pwdadm命令的-f参数说明如下:
-f Flags
Specifies the flags attribute of a password. The Flags variable must be from the following list of comma-separated attributes:
NOCHECK
Signifies that new passwords need not follow the guidelines established in the /etc/security/user file for password composition.
ADMIN
Specifies that password information may be changed only by the root user. Only the root user can enable or disable this attribute.
ADMCHG
Resets the ADMCHG attribute without changing the user’s password. This forces the user to change passwords the next time a login command or an su command is given for the user. The attribute is cleared when the user specified by the User