Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried to delete a user:

# deluser someuser
Removing user `someuser' ...
Warning: group `someuser' has no more members.
userdel: user someuser is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel someuser' returned error code 8. Exiting.

I ran who

# who
myuser pts/0        2013-12-19 23:00 ...

It only shows me logged in. I really need to delete this user but I don't have their password, I have sudo password however. How can I delete it?

share|improve this question
I'm not sure how having their password would help, but you can force-ably set their password with sudo passwd someuser –  virtualxtc Dec 20 '13 at 4:12
That doesn't log them out @virtualxtc But keep that as a comment here because that's still good to know –  JohnMerlino Dec 20 '13 at 4:30
Stupid question, I know, but have you restarted the system? Sometimes that can clear something and get it back working. –  RPi Awesomeness Dec 20 '13 at 4:34
I ended up doing reboot, I was wondering if there was a method that didn't involve reboot –  JohnMerlino Dec 20 '13 at 6:13
I hope you don't want to delete a system user. who will only show the users who are actually logged in, not those one who are in a session with su or sudo. E.g if you su someuser then someuser won't show up in who. –  falconer Dec 20 '13 at 9:03

1 Answer 1

In the man page of deluser, it says that an error code of 8 indicates that the perl paquet "perl-modules" is not installed, maybe you can check this...

Anyway, if you want to force deletion you can use deluser with -f option

deluser -f

but do it only if you don't find another way, it can produce instability... See man page for more information

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.