课堂笔记,共学共享~~加油!
[root@long ~]# passwd test
为test
用户设置密码
[root@long ~]# passwd -S test
查看test
账户的密码信息
test PS 2009-01-08 0 99999 7 -1 (Password set, MD5 crypt.)
[root@long ~]# passwd -S test1
从未设置过口令的账户其口令为锁定状态
test1 LK 2009-01-07 0 99999 7 -1 (Password locked.)
[root@long ~]# passwd -d test
删除test
账户的口令
[root@long ~]# passwd -S test
查看test
账户口令的信息,结果为空口令
test NP 2009-01-08 0 99999 7 -1 (Empty password.)
[root@long ~]# passwd -l test
锁定test
的口令,test
用户就不能自己修改自己的口令了
[root@long ~]# passwd -S test
查看test
账户口令的信息,结果为锁定状态
test LK 2009-01-08 0 99999 7 -1 (Password locked.)
[root@long ~]# passwd -u test
尝试解锁一个空口令的账户,
Unlocking password for user test.
不知道test
用户的口令
passwd: Unsafe operation (use -f to force).
系统提示这样做不安全,如果确认要这么做的话,就用-f
强制解锁
[root@long ~]# passwd -uf test
强制解锁一个空口令的账户
[root@long ~]# passwd -S test
test NP 2009-01-08 0 99999 7 -1 (Empty password.)
密码为空
[root@long ~]# passwd -k test
设置test
账户只有密码过期失效后,才能更新
Changing password for user test.
New UNIX password:www.163.com
Retype new UNIX password:www.163.com
passwd: expired authentication tokens updated successfully.
本文出自 “龙目小子,博闻天下” 博客,转载请与作者联系!