解决:“userdel: user xxxx is currently used by process xxx” 的问题

简介: 解决:“userdel: user xxxx is currently used by process xxx” 的问题

报错原因

创建多个用户后嵌套登陆导致删除某用户时,这个用户还没登出就删除提示,无法删除的问题。Linux会提示:

userdel: user xxxx is currently used by process xxx

解决方法

此时最简单的解决方法,就是杀死该进程,可能需要杀死多个,依次kill,所以执行命令如下:

# 普通用户执行
sudo kill -9 [要杀死的进程ID]
# root用户执行
kill -9  [要杀死的进程ID]

最后再执行

# 普通用户执行
sudo userdel -r [要删除的用户名]
# root用户执行
userdel -r [要删除的用户名]

结果

​查看是否还有该用户:

id [被删除的用户名]

没有则说明删除成功

目录
相关文章
|
4月前
|
数据库
Access denied for user ‘xxx’@‘localhost‘(using password:YES)
Access denied for user ‘xxx’@‘localhost‘(using password:YES)
|
5月前
|
关系型数据库 MySQL 数据库
【已解决】ERROR 1045 - Access denied for user ‘root‘@‘localhost‘ (using password: YES)
【已解决】ERROR 1045 - Access denied for user ‘root‘@‘localhost‘ (using password: YES)
|
6月前
|
监控 安全 网络安全
Failed password for invalid user www from xx.xx.xx.xxx port xxxxx ssh2 问题处理
【5月更文挑战第6天】Failed password for invalid user www from xx.xx.xx.xxx port xxxxx ssh2 问题处理
665 1
|
存储 关系型数据库 MySQL
The user specified as a definer (‘root‘@‘%‘) does not exist
The user specified as a definer (‘root‘@‘%‘) does not exist
131 0
Access denied for user ''@'localhost' (using password: NO)问题的解决
Access denied for user ''@'localhost' (using password: NO)问题的解决
128 0
|
SQL 关系型数据库 MySQL
Access denied for user ‘root‘ @‘123.233.244.218‘(using password:YES)的解决方法
Access denied for user ‘root‘ @‘123.233.244.218‘(using password:YES)的解决方法
240 1
Access denied for user ‘root‘ @‘123.233.244.218‘(using password:YES)的解决方法
|
关系型数据库 MySQL
The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)
The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)
803 0
The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)
|
关系型数据库 MySQL 数据库
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
388 0
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
|
关系型数据库 MySQL 数据库
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES/NO)
初次安装mysql,net start mysql,然后输入mysql -u root -p, 出现enter password,我直接点击回车,结果出现如果下错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)。
4346 1
|
数据安全/隐私保护 Android开发
Javaweb项目碰到的问题- Access denied for user 'root'@'localhost' (using password: YES)
Javaweb项目碰到的问题- Access denied for user 'root'@'localhost' (using password: YES)
357 0