[root@localhost ~]# passwd
-bash: /usr/bin/passwd: Permission denied
[root@localhost ~]# lsattr /usr/bin/passwd
----i----------- /usr/bin/passwd
[root@localhost ~]# chattr -R -i /usr/bin/passwd
[root@localhost ~]# lsattr /usr/bin/passwd
---------------- /usr/bin/passwd
[root@localhost ~]# chmod 755 /usr/bin/passwd
[root@localhost ~]# passwd
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
这种方法对于chmod的限制也是可以解除的