Linux下完全删除用户的两种方法

2019-01-16 21:11:14王冬梅

然后使用 vi 编辑器删除这个用户组。

4.删除 /var/spool/mail 下的邮箱文件

[root@localhost ~]# cd /var/spool/mail [root@localhost mail]# ls gubeiqing [root@localhost mail]# rm -rf gubeiqing [root@localhost mail]# ls [root@localhost mail]#

删除完成,再来创建 gubeiqing 用户。

[root@localhost mail]# useradd gubeiqing [root@localhost mail]# passwd gubeiqing Changing password for user gubeiqing. New password: BAD PASSWORD: The password is a palindrome Retype new password: passwd: all authentication tokens updated successfully.

搞定!

除了这种方法还有一种完全删除的方法。

[root@localhost mail]# userdel -rf gubeiqing [root@localhost mail]# useradd gubeiqing [root@localhost mail]# passwd gubeiqing Changing password for user gubeiqing. New password: BAD PASSWORD: The password is a palindrome Retype new password: passwd: all authentication tokens updated successfully.

使用这两种方法就可以完全删除用户。

总结

以上所述是小编给大家介绍的Linux下完全删除用户的两种方法 ,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对易采站长站网站的支持!

您可能感兴趣的文章:

linux 驱动之Kconfig文件和Makefile文件实例Linux下的chkconfig命令详解linux命令详解之chkconfig命令使用方法新手入门级linux系统常用命令大全快速自学Linux命令的4种方法值得收藏的27个Linux文档编辑命令Linux下截屏并编辑的最佳工具使用userdel命令删除Linux用户的教程详解探索Linux内核:Kconfig的秘密