Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1127893
  • 博文数量: 113
  • 博客积分: 2422
  • 博客等级: 大尉
  • 技术积分: 1393
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-25 17:54
文章分类
文章存档

2016年(1)

2014年(8)

2013年(7)

2012年(13)

2011年(42)

2010年(26)

2009年(6)

2008年(6)

2007年(4)

我的朋友

分类:

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

阅读(5716) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~