useradd添加的用户名无法删除问题

1 创建一个用户名

bintian.xbt@localhost:~$ sudo useradd -m bintian.test
[sudo] password for bintian.xbt:
bintian.xbt@localhost:~$ cd /home/bintian.test/
bintian.xbt@localhost:/home/bintian.test$ ls
examples.desktop
bintian.xbt@localhost:/home/bintian.test$ ls -al
drwxr-xr-x  2 bintian.test bintian.test 4096 Dec 29 21:28 .`这里写代码片`
drwxr-xr-x 80 root         root         4096 Dec 29 21:28 ..
-rw-r--r--  1 bintian.test bintian.test  220 Apr  3  2012 .bash_logout
-rw-r--r--  1 bintian.test bintian.test 3486 Apr  3  2012 .bashrc
-rw-r--r--  1 bintian.test bintian.test 8445 Apr 17  2012 examples.desktop
-rw-r--r--  1 bintian.test bintian.test  675 Apr  3  2012 .profile

2删除用户名

bintian.xbt@localhost:~$ sudo userdel -r bintian.test
[sudo] password for bintian.xbt:
userdel: user bintian.test is currently logged in

查找资料发现:主要是新建的用户还有一些进程在运行 通过 lsof | grep bintian.test or lsof -u bintian.test 命令可以查看
解决办法:pkill -u username or pkill -u uid 杀掉与bintian.test有关的进程就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值