centos6 —— userdel :user is currently used by process

若常见的方法都解决不了,

https://stackoverflow.com/questions/28103045/how-can-i-delete-a-user-in-linux-when-the-system-says-its-currently-used-in-a-pr

比如:

①使用vipw 及 vipw -s;  

②First use pkill or kill -9 <pid> to kill the process.

===============================

大家可以看看我这种疑难问题。很有可能是因为当前用户是(图形化)默认登陆用户,导致无法删掉用户进程。

解决办法是:

修改:

/etc/gdm/custom.conf

此文件中的自动登陆设置注释掉

之后重启机器,在图形化界面选择root用户登陆,再用命令 userdel 删掉用户即可。 其他命令诸如 usermod 修改用户名称,解决办法也类似。

猜你喜欢

转载自blog.csdn.net/qq0719/article/details/81413101