[Adduser-devel] Bug#868568: adduser - deluser command says user has running processes when user has a custom UID assigned

Niels Hendriks niels at nuvini.com
Sun Jul 16 18:17:33 UTC 2017


Package: adduser
Version: 3.115
OS: Debian 9 amd64

Linux debian 4.9.15-x86_64-linode81 #1 SMP Fri Mar 17 09:47:36 EDT 2017
x86_64 GNU/Linux

dpkg -s libc6 | grep ^Version
Version: 2.24-11

Hello,

On a clean Debian 9 amd64 install the deluser command detects running
processes from the user I am trying to delete, while no processes are
running under that user. This is only the case when the user has a special
UID assigned.

Steps to reproduce on a clean Debian 9 install. I did this on a Linode upon
the first login with SSH as root:

adduser foo
adduser foo1234 --uid 101234
adduser foo1234 sudo
su - foo1234
sudo su -
# enter sudo password
deluser foo

This gives the following output:

root at debian:~# adduser foo
Adding user `foo' ...
Adding new group `foo' (1000) ...
Adding new user `foo' (1000) with group `foo' ...
Creating home directory `/home/foo' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for foo
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y
root at debian:~# adduser foo1234 --uid 101234
Adding user `foo1234' ...
Adding new group `foo1234' (101234) ...
Adding new user `foo1234' (101234) with group `foo1234' ...
Creating home directory `/home/foo1234' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for foo1234
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y
root at debian:~# adduser foo1234 sudo
Adding user `foo1234' to group `sudo' ...
Adding user foo1234 to group sudo
Done.
root at debian:~# su - foo1234
foo1234 at debian:~$ sudo su -
[sudo] password for foo1234:
root at debian:~# deluser foo
Removing user `foo' ...
Warning: group `foo' has no more members.
userdel: user foo is currently used by process 4892
/usr/sbin/deluser: `/usr/sbin/userdel foo' returned error code 8. Exiting.
root at debian:~#
root at debian:~# ps aux | grep 4892
foo1234   4892  0.0  0.4  20936  4740 pts/0    S    17:54   0:00 -su
root      4917  0.0  0.0  12788   940 pts/0    S+   17:55   0:00 grep 4892


As you can see I am unable to delete the user foo because of the running
process with pid 4892, which is actually the process from user foo1234

When I do not assign a specific UID to the user foo1234 it works correctly
and as expected.

I also used specific UIDs in debian 8, and this issue did not pop up there.
It seems to be new in debian 9.

This is my first bug report to Debian so I hope all required information is
present and that you are able to reproduce it with the above steps.

Thanks,
Niels Hendriks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20170716/a8f734ae/attachment.html>


More information about the Adduser-devel mailing list