• adduser claims existing diretory in postinst when running piuparts for

    From Andreas Tille@21:1/5 to All on Fri May 20 09:40:01 2022
    Hi,

    the Debian Science team has packaged node-shiny-server[1].
    It creates a system user in its postinst script. I've added
    some debug output to this script[2] since I wanted to debug
    a piuparts issue which you can see here in salsa CI[3].

    This log shows two ways to verify that the home directory
    of the user does not exist, but adduser fails with

    Stopped: Couldn't create home directory `/home/shiny': File exists.

    anyway.

    Any idea what's going on here and how to fix this?

    Kind regards

    Andreas.

    [1] https://salsa.debian.org/science-team/shiny-server
    [2] https://salsa.debian.org/science-team/shiny-server
    [3] https://salsa.debian.org/science-team/node-shiny-server/-/jobs/2785645#L5900

    --
    http://fam-tille.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ansgar@21:1/5 to Andreas Tille on Fri May 20 09:50:01 2022
    Hi,

    On Fri, 2022-05-20 at 09:37 +0200, Andreas Tille wrote:
    the Debian Science team has packaged node-shiny-server[1].
    It creates a system user in its postinst script. I've added
    some debug output to this script[2] since I wanted to debug
    a piuparts issue which you can see here in salsa CI[3].

    This log shows two ways to verify that the home directory
    of the user does not exist, but adduser fails with

    Stopped: Couldn't create home directory `/home/shiny': File
    exists.

    anyway.

    Any idea what's going on here and how to fix this?

    It seems wrong for a system user to use a directory below /home.

    Ansgar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joost van =?utf-8?Q?Baal-Ili=C4=87?@21:1/5 to Ansgar on Fri May 20 10:20:01 2022
    Hi Andreas e.a.,

    On Fri, May 20, 2022 at 09:43:50AM +0200, Ansgar wrote:
    On Fri, 2022-05-20 at 09:37 +0200, Andreas Tille wrote:
    the Debian Science team has packaged node-shiny-server[1].
    It creates a system user in its postinst script. I've added
    some debug output to this script[2] since I wanted to debug
    a piuparts issue which you can see here in salsa CI[3].

    This log shows two ways to verify that the home directory
    of the user does not exist, but adduser fails with

    Stopped: Couldn't create home directory `/home/shiny': File
    exists.

    anyway.

    Any idea what's going on here and how to fix this?

    It seems wrong for a system user to use a directory below /home.

    Yup, see also https://lintian.debian.org/tags/maintainer-script-lacks-home-in-adduser

    In
    https://wiki.debian.org/AccountHandlingInMaintainerScripts
    there are some ideas; I believe there is not yet final consensus in Debian on how to deal with adduser in maintainer scripts...

    Anyway HTH, Bye,

    Joost

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Barry@21:1/5 to All on Tue Jun 7 00:50:01 2022
    Hi,

    On Fri, 2022-05-20 at 09:58 +0200, Joost van Baal-Ilić wrote:
    Yup, see also https://lintian.debian.org/tags/maintainer-script-lacks-home-in-adduser

    Just a quick FYI: this will have real consequences in the next release
    of adduser; system accounts created without --home will be set to
    /nonexistent.

    Cheers,
    Matt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Matt Barry on Tue Jun 7 14:30:01 2022
    On Mon, Jun 06, 2022 at 06:41:18PM -0400, Matt Barry wrote:
    On Fri, 2022-05-20 at 09:58 +0200, Joost van Baal-Ilić wrote:
    Yup, see also https://lintian.debian.org/tags/maintainer-script-lacks-home-in-adduser

    Just a quick FYI: this will have real consequences in the next release
    of adduser; system accounts created without --home will be set to /nonexistent.

    Also, a row of bug reports have been created for adduser in result of
    the discussion that was initiated on debian-devel earlier this year. And
    there are real people, such as Matt, working on them, so adduser is
    going to get better.

    There is also a wishlist bug against policy clarifying account
    management in maintainer scripts.

    The bug reports also give a pretty good overview about what adduser will
    do, so interested package maintainers are invited to sift through them
    and maybe adapt their maintainer scripts.

    In addition, as one of the adduser maintainers, I am open to questions
    and suggestions.

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)