<div dir="ltr">Package: adduser<div>Version: 3.115</div><div>OS: Debian 9 amd64</div><div><br></div><div>Linux debian 4.9.15-x86_64-linode81 #1 SMP Fri Mar 17 09:47:36 EDT 2017 x86_64 GNU/Linux<br></div><div><br></div><div><div>dpkg -s libc6 | grep ^Version</div><div>Version: 2.24-11</div></div><div><br></div><div>Hello,</div><div><br></div><div>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.</div><div><br></div><div>Steps to reproduce on a clean Debian 9 install. I did this on a Linode upon the first login with SSH as root:</div><div><br></div><div><div>adduser foo</div><div>adduser foo1234 --uid 101234</div><div>adduser foo1234 sudo</div><div>su - foo1234</div></div><div>sudo su -</div><div># enter sudo password</div><div>deluser foo</div><div><br></div><div>This gives the following output:</div><div><br></div><div><div>root@debian:~# adduser foo</div><div>Adding user `foo' ...</div><div>Adding new group `foo' (1000) ...</div><div>Adding new user `foo' (1000) with group `foo' ...</div><div>Creating home directory `/home/foo' ...</div><div>Copying files from `/etc/skel' ...</div><div>Enter new UNIX password:</div><div>Retype new UNIX password:</div><div>passwd: password updated successfully</div><div>Changing the user information for foo</div><div>Enter the new value, or press ENTER for the default</div><div>        Full Name []:</div><div>        Room Number []:</div><div>        Work Phone []:</div><div>        Home Phone []:</div><div>        Other []:</div><div>Is the information correct? [Y/n] y</div><div>root@debian:~# adduser foo1234 --uid 101234</div><div>Adding user `foo1234' ...</div><div>Adding new group `foo1234' (101234) ...</div><div>Adding new user `foo1234' (101234) with group `foo1234' ...</div><div>Creating home directory `/home/foo1234' ...</div><div>Copying files from `/etc/skel' ...</div><div>Enter new UNIX password:</div><div>Retype new UNIX password:</div><div>passwd: password updated successfully</div><div>Changing the user information for foo1234</div><div>Enter the new value, or press ENTER for the default</div><div>        Full Name []:</div><div>        Room Number []:</div><div>        Work Phone []:</div><div>        Home Phone []:</div><div>        Other []:</div><div>Is the information correct? [Y/n] y</div><div>root@debian:~# adduser foo1234 sudo</div><div>Adding user `foo1234' to group `sudo' ...</div><div>Adding user foo1234 to group sudo</div><div>Done.</div><div>root@debian:~# su - foo1234</div><div>foo1234@debian:~$ sudo su -</div><div>[sudo] password for foo1234:</div><div>root@debian:~# deluser foo</div><div>Removing user `foo' ...</div><div>Warning: group `foo' has no more members.</div><div>userdel: user foo is currently used by process 4892</div><div>/usr/sbin/deluser: `/usr/sbin/userdel foo' returned error code 8. Exiting.</div><div>root@debian:~#</div><div>root@debian:~# ps aux | grep 4892</div><div>foo1234   4892  0.0  0.4  20936  4740 pts/0    S    17:54   0:00 -su</div><div>root      4917  0.0  0.0  12788   940 pts/0    S+   17:55   0:00 grep 4892</div></div><div><br></div><div><br></div><div>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</div><div><br></div><div>When I do not assign a specific UID to the user foo1234 it works correctly and as expected.</div><div><br></div><div>I also used specific UIDs in debian 8, and this issue did not pop up there. It seems to be new in debian 9.</div><div><br></div><div>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.</div><div><br></div><div>Thanks,</div><div>Niels Hendriks</div></div>