chattr -i

7、执行chattr 
#chattr -i  /etc/passwd
# lsattr -v /etc/passwd 
2095582053 ------------- /etc/passwd
# chattr -i  /etc/shadow
8、同步文件
pwconv
9、成功修改密码
passwd 
Changing password for user root.
New UNIX password: 
BAD PASSWORD: it is WAY too short
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.

你可能感兴趣的:(attr)