[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Question on the use of "/nonexistent"



Greetings:

I am a developer who is new to making contributions to Debian.  Most of
my work so far has been focused on making improvements to the "adduser"
package.  Of course, bug triage is one of the first things on which I am
trying to show progress.

On the relevant BTS page, I came across this bug:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=152195

A summary of this bug is below...

  # adduser --system --no-create-home foo
  # getent passwd foo
  foo:x:130:65534::/home/foo:/usr/sbin/nologin

As you can see, "/home/foo" is named as the new user's home directory,
but that directory is not created due to the "--no-create-home" option.

This was reported many years ago and was given the "wontfix" tag.  I
believe this should be reversed since Debian policy now has this to
say...

  https://www.debian.org/doc/debian-policy/ch-opersys.html#non-existent-home-directories

I hope to see that, whenever possible, the "adduser" tools conform to
Debian Policy when managing the addition and removal of users and
groups.

So, my question is: Should "/nonexistent" be listed in /etc/passwd when
the "adduser" command creates a new user without a home directory?  If
so, I can confirm that bug and eventually get to work on it. :)

The Debian Policy wording is a bit confusing here...

  The canonical non-existent home directory is /nonexistent. Users
  who should not have a home directory should have their home
  directory set to this value.

As you see, it says "Users who should not..." rather than "Users who do
not...", which has a different meaning to me.  Is "/nonexistent" for
users who should never have a home directory or for users who currently
do not have a home directory but may have one in the future?

Any clarity that can be provided on this last point will be a great help
to me.

Thanks in advance!

-- 
Jason Franklin


Reply to: