首页 > 系统服务 > 详细

linux杀死进程报错问题

时间:2015-09-10 17:39:55      阅读:549      评论:0      收藏:0      [点我收藏+]

本地创建了两个账号,text和text1

现在欲删除text1用户,执行如下

[text1@localhost /]$ su text

Password: 

[text@localhost /]$ su 

Password: 

[root@localhost /]# userdel text1

userdel: user text1 is currently used by process 55462

出现了报错,提示text1有程序正在运行,无法删除此用户

那就结束这个用户的所有进程吧

[root@localhost /]# killall -u text1


Session terminated, killing shell...

Session terminated, killing shell...

Session terminated, killing shell...[root@localhost /]#  ...killed.

 ...killed.

 ...killed.

You have new mail in /var/spool/mail/root

[text1@localhost root]$ [text1@localhost /]$ [text1@localhost Desktop]$ 

[root@localhost /]# 

这里本来以为结束成功,于是就进行了下一步,继续删除用户

[root@localhost /]# userdel text1

userdel: user text1 is currently used by process 55462

[root@localhost /]# exit

依旧报错,看来还是没有结束text1用户的进程

刚才不是执行结束进程的命令了吗?仔细回去查了一下返回的信息,发现应该是没有成功

注意到中间有一句话You have new mail in /var/spool/mail/root

查询资料找到了解决办法,切换到root输入

[root@localhost Desktop]# echo "unset MAILCHECK">> /etc/profile

那么继续

[root@localhost Desktop]# killall -u text1

[root@localhost Desktop]# userdel text1

[root@localhost Desktop]# su text

[text@localhost Desktop]$ su

Password: 

[root@localhost Desktop]# su text1

su: user text1 does not exist

大功告成~






本文出自 “我的博客” 博客,谢绝转载!

linux杀死进程报错问题

原文:http://10552290.blog.51cto.com/10542290/1693408

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!