This is my first feature request/ bug report, hopefully it's sufficiently
understandable and correct.

I noticed that the ftpd daemon uses the getusershells() (
https://man7.org/linux/man-pages/man3/getusershell.3.html) function during
authentication to check if the user has a valid shell. (ftpd/auth.c line
126 in current inetutils-2.6)

At a high level :

- I understand that the /etc/passwd file (
https://man7.org/linux/man-pages/man5/passwd.5.html) is checked first to
determine the user shell

- And then the /etc/shells file is used (through the getusershells()
function) to see if the user shell is within the listed 'allowed' shells on
the systems

The documentation (
https://www.gnu.org/software/inetutils/manual/inetutils.html#Authentication)
currently states that '3. The user must have a standard shell'

I think the statement is completely correct, but I want to suggest a more
precise version.
Something like :

"""

3. The user must have a standard shell : The getusershells function is used
during authentication to determine if the shell listed in /etc/passwd is
registered as valid in the system (in the /etc/shells). See getusershells
documentation for more informations.

"""

I suggest this modification because I struggled for many hours to figure
out that authentication was failing on my system due to the absence of this
file. Of course, this is not a bug, my system was not setup properly, but
the documentation could be improved.

I note that other daemon do not check for this file, as their
authentication wasn't failing on my system even tough the /etc/shells file
was absent. telenetd is in such case. This made this problem really
difficult to track down. Thanks you for the great software and kind regards.


-- 
Benjamin Cathelineau.
  • [ftpd] docu... Benjamin Cathelineau
    • Re: [f... Erik Auerswald
      • Re... Collin Funk
        • ... Erik Auerswald
      • Re... Simon Josefsson via Bug reports for the GNU Internet utilities
        • ... Collin Funk
          • ... Simon Josefsson via Bug reports for the GNU Internet utilities
            • ... Collin Funk

Reply via email to