[root@linuxcool ~]# passwd
Changing password for user root.
New password: 输入密码
Retype new password: 再次输入密码
passwd: all authentication tokens updated successfully.
修改指定用户的密码值:
[root@linuxcool ~]# passwd linuxprobe
Changing password for user linuxprobe.
New password: 输入密码
Retype new password: 再次输入密码
passwd: all authentication tokens updated successfully.
锁定指定用户的密码值,不允许其进行修改:
[root@linuxcool ~]# passwd -l linuxprobe
Locking password for user linuxprobe.
passwd: Success
解锁指定用户的密码值,允许其进行修改:
[root@linuxcool ~]# passwd -u linuxprobe
Unlocking password for user linuxprobe.
passwd: Success
强制指定的用户在下次登陆时必须重置其密码:
[root@linuxcool ~]# passwd -e linuxprobe
Expiring password for user linuxprobe.
passwd: Success
删除指定用户的密码值:
[root@linuxcool ~]# passwd -d linuxprobe
Removing password for user linuxprobe.
passwd: Success