T
T
Twelfth Doctor2017-09-30 09:04:34
linux
Twelfth Doctor, 2017-09-30 09:04:34

Why can't I delete a user?

Hello. For some reason, the user cannot be deleted.
https://pastebin.com/XThUNy18

Mistakes
[email protected]:~# deluser vhost_26
Removing user `vhost_26' ...
Warning: group `vhost_26' has no more members.
userdel: user vhost_26 is currently used by process 801
/usr/sbin/deluser: `/usr/sbin/userdel vhost_26' returned error code 8. Exiting.
[email protected]:~# kill 801
[email protected]:~# deluser vhost_26
Removing user `vhost_26' ...
Warning: group `vhost_26' has no more members.
userdel: user vhost_26 is currently used by process 802
/usr/sbin/deluser: `/usr/sbin/userdel vhost_26' returned error code 8. Exiting.
[email protected]:~# kill 802
[email protected]:~# deluser vhost_26
Removing user `vhost_26' ...
Warning: group `vhost_26' has no more members.
userdel: user vhost_26 is currently used by process 4897
/usr/sbin/deluser: `/usr/sbin/userdel vhost_26' returned error code 8. Exiting.
[email protected]:~# kill 4897
[email protected]:~# deluser vhost_26
Removing user `vhost_26' ...
Warning: group `vhost_26' has no more members.
userdel: user vhost_26 is currently used by process 4904
/usr/sbin/deluser: `/usr/sbin/userdel vhost_26' returned error code 8. Exiting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Official account of the Timeweb team, 2020-07-07
@timeweb_team

in this case, we can conclude that several processes are running under this user.
You can get a list of all PID processes that are running as a user with pgrep -u vhost_26 , and kill all user processes with pkill -u vhost_26

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question