合 AIX系统3004-314 Password was recently used and is not valid for reuse
本文简介
今天有一套AIX的环境密码过期了,需要修改密码,结果没注意大小写的问题把密码修改错了,想改回去的时候碰到了3004-314 Password was recently used and is not valid for reuse.错误,网上搜了很多方法都一样,但还是不能解决,最后经过同事的帮忙修改了/etc/passwd文件,终于可以了,简单记录下,备忘,再次多谢同事的帮忙。
故障环境介绍
项目 | os |
---|---|
OS版本及kernel版本 | AIX 64位 6.1.0.0 |
OS hostname | ZHLHRDB2 |
注:标红的选项是必填,且需要特别关注的项目 |
故障解决过程
修改root密码报错,不能使用以前用过的密码,但我修想用以前的密码:
ZHLHRDB2:root:/>passwd root
Changing password for "root"
root's New password:
3004-314 Password was recently used and is not valid for reuse.
root's New password:
按照网上的方法执行2条命令:
ZHLHRDB2:root:/>pwdadm -c root
ZHLHRDB2:root:/>smitty chuser
Change / Show Characteristics of a User
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
Number of FAILED LOGINS before [0] ====》默认为8,修改为0 #
ZHLHRDB2:root:/>passwd root
Changing password for "root"
root's New password:
3004-314 Password was recently used and is not valid for reuse.
root's New password:
经过同事的指点,查看了/etc/passwd文件,和其他主机做了对比,多出来672/F/*BOCSUP//BOC System Super ID 这一段内容,于是删掉后再修改就可以了。
ZHLHRDB2:root:/>cat /etc/passwd | grep root
root:!:0:0:672/F/*BOCSUP//BOC System Super ID:/:/usr/bin/ksh
删除672/F/*BOCSUP//BOC System Super ID后:
ZHLHRDB2:root:/>cat /etc/passwd|grep root
root:!:0:0::/:/usr/bin/ksh
修改root密码,成功:
Changing password for "root"
root's New password:
Enter the new password again:
其它blog方法
smit chuser
修改number of passwords before reuse的值为0
然后执行成功后退出。
或者执行:chsec -f /etc/security/lastlog -s sun007 -a unsuccessful_login_count=0
或者执行:
# pwdadm -c user #清楚账户的密码标志
# passwd user 重新修改密码即可/etc/security/user
maxage = 0如果是密码过期了,比如
$ su - user
user's Password:
[compat]: 3004-332 Your password has expired.root执行
#pwdadm -c user设置只允许管理员更新密码
# pwdadm -f ADMIN user
# su - user
$ passwd user
Changing password for "user"
3004-664 You are not authorized to change "user" password.
3004-709 Error changing password for "user" : You do not have permission.
一生产机的账户需要将密码设置此前曾使用的一个密码,结果报出错误提示,具体信息如下:
$ passwd sun007
Changing password for "sun007"
sun007's Old password:
sun007's New password: