在FreeBSD中添加用户(2)(3)
2008-02-23 08:02:59来源:互联网 阅读 ()
passwd
Changing local password for test.
Old password:
New password:
Retype new password:
passwd: updating the database...
passwd: done
如果用户忘了他们的口令会如何?还没有彻底完蛋,因为超级用户可以为他们更改口令;当超级用户更改其它用户的口令时,系统就不会提示他输入该用户的旧口令了:
su:
Password:
passwd test
Changing local password for test.
New password:
Retype new password:
passwd: updating the database...
passwd: done
注意,超级用户要使用用户名作为passwd工具的一个参数;如果不带用户名,那更改的就是root账号的口令了。
我要介绍的最后一个更改口令文件的工具是rmuser。该工具用于删除用户账号和任何与该用户相关的东西;所以它只能由超级用户运行。让我们来删除“test”账号:
rmuser
Enter login name for user to remove: test
Matching password entry:
test:$1$P6kMmPWG$rZiu/HfaIPVwJC6hdOImc/:1002:1002::0:0:test:/home/test:/bin/tcsh
Is this the entry you wish to remove? y
Remove user's home directory (/home/test)? y
Killed process(es) belonging to test.
Updating password file, updating databases, done.
Updating group file: (removing group test -- personal group is empty) done.
Removing user's home directory (/home/test): done.
Removing user's incoming mail file /var/mail/test: done.
Removing files belonging to test from /tmp: done.
Removing files belonging to test from /var/tmp: done.
Removing files belonging to test from /var/tmp/vi.recover: done.
看,这是个很有效的工具;它不仅从口令文件中删除用户信息,还从删除用户的主目录、邮件文件和临时目录中属于该用户的任何文件。你还应该注意到,在我删除test用户前,他的口令字段已经不是空的了,看来passwd工具已经成功更新了口令数据库。
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:在FreeBSD中添加用户(1)
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash
