Package: adduser
Version: 3.145
Severity: minor

Hi,

this occurred to me:

root@swivel-sid-buildd-amd64-etqw:/srv# mkdir /var/lib/foo
root@swivel-sid-buildd-amd64-etqw:/srv# adduser --system --group 
--home=/var/lib/foo foo
warn: The home directory `/var/lib/foo' already exists.  Not touching this 
directory.
warn: Warning: The home directory `/var/lib/foo' does not belong to the user 
you are currently creating.
root@swivel-sid-buildd-amd64-etqw:/srv#

Having a system account that has a home directory is a not so uncommon
idiom.

I think that for adduser --system, the "home directory already exists"
message shold not be displayed.

The "does not belong to the user" message is also bad at this place. If
the package ships the actual directory (because there is already default
contents in there), the directory still exists as root:root before it
can be chowned to the correct user.

Adding --no-create-home turns off both messages, but that would need
that nearly all packages saying --home would also need to say
--no-create-home.

What does the team think about this?

Greetings
Marc

Reply via email to