• Bug#1103776: adduser: Please mention newgrp in man page

    From Tomas Pospisek@21:1/5 to All on Mon Apr 21 15:30:01 2025
    This is a multi-part MIME message sent by reportbug.


    Package: adduser
    Version: 3.134
    Severity: wishlist
    Tags: patch

    Hello dear adduser maintainer(s),

    I swear, *every* time I do `adduser user group` I have
    to look up on the internet how to make that group available
    to that user in a running shell session...

    The attached patch adds two phrases to the "Add an existing user
    to an existing group" paragraph that tells the reader to use
    `newgrp` to achieve that and mentions `newgrp` in the
    "SEE ALSO" section.

    I'd be glad if you could include this in the man page so I
    (and probably others) can stop looking it up on the internet
    each time...

    Best greetings and thank you for your work on `adduser`.
    *t

    -- System Information:
    Debian Release: 12.10
    APT prefers stable-security
    APT policy: (500, 'stable-security'), (500, 'stable')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.1.0-32-amd64 (SMP w/8 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_OOT_MODULE
    Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8), LANGUAGE=de_CH:de
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages adduser depends on:
    ii passwd 1:4.13+dfsg1-1+b1

    adduser recommends no packages.

    Versions of packages adduser suggests:
    ii cron 3.0pl1-162
    ii liblocale-gettext-perl 1.07-5
    ii perl 5.36.0-7+deb12u2
    pn quota <none>

    -- debconf information excluded

    --- adduser-3.150/doc/adduser.8 2025-03-28 14:21:07.000000000 +0100
    +++ adduser-3.150-new/doc/adduser.8 2025-04-21 14:32:25.573790916 +0200
    @@ -293,6 +293,11 @@
    If called with two non-option arguments,
    \fBadduser\fP will add an existing user to an existing group.

    +The group will only be available to a user in a new shell
    +session. If you need the group to be immediately available
    +to a user in a shell session, then execute \fBnewgrp group\fP
    +or \fBnewgrp -\fP in that user's shell session.
    +
    .SH OPTIONS
    Different modes of \fBadduser\fP allow different options.
    If no valid modes are listed for a option,
    @@ -781,6 +786,7 @@
    .BR adduser.conf (5),
    .BR deluser (8),
    .BR groupadd (8),
    +.BR newgrp (1),
    .BR useradd (8),
    .BR usermod (8),
    .BR /usr/share/doc/base-passwd/users-and-groups.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Tomas Pospisek on Mon Apr 21 21:30:01 2025
    Hi,

    I am totally not sure whether this is appropriate. I agree that this
    behavior is a quick of many operating systems, but I don't think that
    adduser should begin to document operating system quirks. People might
    see this as an issue in adduser, which it isn't.

    Greetings
    Marc


    On Mon, Apr 21, 2025 at 02:44:35PM +0200, Tomas Pospisek wrote:
    Package: adduser
    Version: 3.134
    Severity: wishlist
    Tags: patch

    Hello dear adduser maintainer(s),

    I swear, *every* time I do `adduser user group` I have
    to look up on the internet how to make that group available
    to that user in a running shell session...

    The attached patch adds two phrases to the "Add an existing user
    to an existing group" paragraph that tells the reader to use
    `newgrp` to achieve that and mentions `newgrp` in the
    "SEE ALSO" section.

    I'd be glad if you could include this in the man page so I
    (and probably others) can stop looking it up on the internet
    each time...

    Best greetings and thank you for your work on `adduser`.
    *t

    -- System Information:
    Debian Release: 12.10
    APT prefers stable-security
    APT policy: (500, 'stable-security'), (500, 'stable')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.1.0-32-amd64 (SMP w/8 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_OOT_MODULE
    Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8), LANGUAGE=de_CH:de
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages adduser depends on:
    ii passwd 1:4.13+dfsg1-1+b1

    adduser recommends no packages.

    Versions of packages adduser suggests:
    ii cron 3.0pl1-162
    ii liblocale-gettext-perl 1.07-5
    ii perl 5.36.0-7+deb12u2
    pn quota <none>

    -- debconf information excluded

    --- adduser-3.150/doc/adduser.8 2025-03-28 14:21:07.000000000 +0100 >+++ adduser-3.150-new/doc/adduser.8 2025-04-21 14:32:25.573790916 +0200
    @@ -293,6 +293,11 @@
    If called with two non-option arguments,
    \fBadduser\fP will add an existing user to an existing group.

    +The group will only be available to a user in a new shell
    +session. If you need the group to be immediately available
    +to a user in a shell session, then execute \fBnewgrp group\fP
    +or \fBnewgrp -\fP in that user's shell session.
    +
    .SH OPTIONS
    Different modes of \fBadduser\fP allow different options.
    If no valid modes are listed for a option,
    @@ -781,6 +786,7 @@
    .BR adduser.conf (5),
    .BR deluser (8),
    .BR groupadd (8),
    +.BR newgrp (1),
    .BR useradd (8),
    .BR usermod (8),
    .BR /usr/share/doc/base-passwd/users-and-groups.html


    -- ----------------------------------------------------------------------------- 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)
  • From Tomas Pospisek@21:1/5 to Marc Haber on Tue Apr 22 00:00:01 2025
    Hi Marc!

    On Mon, 21 Apr 2025, Marc Haber wrote:

    I am totally not sure whether this is appropriate. I agree that this behavior is a quick of many operating systems, but I don't think that adduser should begin to document operating system quirks. People might see this as an issue in adduser, which it isn't.

    Well, I mean the goal of "adduser user group" is to add a user to a
    group... except that - it doesn't. As a user of adduser I'm not really interested who's fault it is - I just want to get the job done.

    At some point I have somehow found out that using some other magic in
    addition is necessary. Other users of adduser might not know and just
    think that `adduser user group` doesn't work or is broken or ...

    As I said - the user doesn't and shouldn't actually need to care where the blame lies...

    So why not give the user a hand to get the job done?
    *t

    On Mon, Apr 21, 2025 at 02:44:35PM +0200, Tomas Pospisek wrote:
    Package: adduser
    Version: 3.134
    Severity: wishlist
    Tags: patch

    Hello dear adduser maintainer(s),

    I swear, *every* time I do `adduser user group` I have
    to look up on the internet how to make that group available
    to that user in a running shell session...

    The attached patch adds two phrases to the "Add an existing user
    to an existing group" paragraph that tells the reader to use
    `newgrp` to achieve that and mentions `newgrp` in the
    "SEE ALSO" section.

    I'd be glad if you could include this in the man page so I
    (and probably others) can stop looking it up on the internet
    each time...

    Best greetings and thank you for your work on `adduser`.
    *t

    -- System Information:
    Debian Release: 12.10
    APT prefers stable-security
    APT policy: (500, 'stable-security'), (500, 'stable')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.1.0-32-amd64 (SMP w/8 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_OOT_MODULE
    Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8),
    LANGUAGE=de_CH:de
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages adduser depends on:
    ii passwd 1:4.13+dfsg1-1+b1

    adduser recommends no packages.

    Versions of packages adduser suggests:
    ii cron 3.0pl1-162
    ii liblocale-gettext-perl 1.07-5
    ii perl 5.36.0-7+deb12u2
    pn quota <none>

    -- debconf information excluded

    --- adduser-3.150/doc/adduser.8 2025-03-28 14:21:07.000000000 +0100
    +++ adduser-3.150-new/doc/adduser.8 2025-04-21 14:32:25.573790916 +0200
    @@ -293,6 +293,11 @@
    If called with two non-option arguments,
    \fBadduser\fP will add an existing user to an existing group.

    +The group will only be available to a user in a new shell
    +session. If you need the group to be immediately available
    +to a user in a shell session, then execute \fBnewgrp group\fP
    +or \fBnewgrp -\fP in that user's shell session.
    +
    .SH OPTIONS
    Different modes of \fBadduser\fP allow different options.
    If no valid modes are listed for a option,
    @@ -781,6 +786,7 @@
    .BR adduser.conf (5),
    .BR deluser (8),
    .BR groupadd (8),
    +.BR newgrp (1),
    .BR useradd (8),
    .BR usermod (8),
    .BR /usr/share/doc/base-passwd/users-and-groups.html


    -- ----------------------------------------------------------------------------- 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)
  • From Marc Haber@21:1/5 to Tomas Pospisek on Tue Apr 22 09:40:01 2025
    On Mon, Apr 21, 2025 at 11:14:47PM +0200, Tomas Pospisek wrote:
    On Mon, 21 Apr 2025, Marc Haber wrote:

    I am totally not sure whether this is appropriate. I agree that this >>behavior is a quick of many operating systems, but I don't think
    that adduser should begin to document operating system quirks.
    People might see this as an issue in adduser, which it isn't.

    Well, I mean the goal of "adduser user group" is to add a user to a
    group... except that - it doesn't. As a user of adduser I'm not really >interested who's fault it is - I just want to get the job done.

    It adds the user to the group. It is not adduser's fault that /etc/group
    is just read on login.

    At some point I have somehow found out that using some other magic in >addition is necessary. Other users of adduser might not know and just
    think that `adduser user group` doesn't work or is broken or ...

    That is not magic, it's basic Unix semantic.

    So why not give the user a hand to get the job done?

    Because the next user is going to want more unrelated docs. I have spent
    in the last release cycle literally days to clean adduser's man pages of redundant information to make it easier to maintain them. This would be counterproductive.

    Greetings
    Marc

    P.S.: I keep falling into that trap myself

    -- ----------------------------------------------------------------------------- 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)
  • From Tomas Pospisek@21:1/5 to Jason Franklin on Tue Apr 22 16:30:02 2025
    On Tue, 22 Apr 2025, Jason Franklin wrote:

    On Tue, Apr 22, 2025 at 09:54:54AM -0400, Jason Franklin wrote:
    At some point I have somehow found out that using some other magic in
    addition is necessary. Other users of adduser might not know and just think >>> that `adduser user group` doesn't work or is broken or ...

    I actually wouldn't rely on "newgrp" too much for this purpose. It may
    not work the way you think.

    To follow up on what I said here, I also want to address the patch you provided as this may be different than what you think as well.

    If you do…

    # adduser foo bar

    … you have added user "foo" to group "bar" where the latter is now
    a supplementary group for the former (i.e., you've updated system
    records).

    If the user now runs "newgrp bar", the user will assume "bar" as their primary group. This is ~not~ the same as having the group appended to
    their supplementary groups in their current shell session.

    There are other differences, but "log out & log in" remains the best and
    most complete and correct advice for this situation. It provides the
    most predictable result for the user.

    I agree with that

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Jason Franklin on Tue Apr 22 18:50:01 2025
    On Tue, Apr 22, 2025 at 12:18:42PM -0400, Jason Franklin wrote:
    Marc, do you think this is reasonable?

    I am still not a fan. That additional language needs to be maintained, translated, proofread, and discussed. I'd rather not having to do that.

    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)
  • From Tomas Pospisek@21:1/5 to Marc Haber on Wed Apr 23 12:10:01 2025
    On Tue, 22 Apr 2025, Marc Haber wrote:

    On Tue, Apr 22, 2025 at 12:18:42PM -0400, Jason Franklin wrote:
    Marc, do you think this is reasonable?

    I am still not a fan. That additional language needs to be maintained, translated, proofread, and discussed. I'd rather not having to do that.

    So I suggest to add just *one* *single* phrase:

    "The added group will not be visible in current user sessions"

    Is that an acceptable compromise between "the user is left completely in
    the dark" and "maintaining additional words adds too much of a workload"?
    *t

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Tomas Pospisek on Thu Apr 24 10:50:01 2025
    On Wed, Apr 23, 2025 at 12:01:45PM +0200, Tomas Pospisek wrote:
    "The added group will not be visible in current user sessions"

    There will be a bug report "please make added groups visible in current
    user sessions" since this sentence suggests that it's a design decision
    in adduser.

    Is that an acceptable compromise between "the user is left completely
    in the dark" and "maintaining additional words adds too much of a
    workload"?

    "Leaving people in the dark" is suggesting that the adduser maintainers
    act in bad faith. We Don't.

    *t

    -- ----------------------------------------------------------------------------- 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)
  • From Tomas Pospisek@21:1/5 to Marc Haber on Thu Apr 24 11:20:01 2025
    On Thu, 24 Apr 2025, Marc Haber wrote:

    On Wed, Apr 23, 2025 at 12:01:45PM +0200, Tomas Pospisek wrote:
    "The added group will not be visible in current user sessions"

    There will be a bug report "please make added groups visible in current user sessions" since this sentence suggests that it's a design decision in adduser.

    Is that an acceptable compromise between "the user is left completely in
    the dark" and "maintaining additional words adds too much of a workload"?

    "Leaving people in the dark" is suggesting that the adduser maintainers act in bad faith. We Don't.

    Is there a desire to improve the situation for the user or is there not? Because if there is no desire to improve the situtation for the user then
    there is no point discussing semantics of words. This discussion has been
    going on for a dozen of posts with me trying to improve the situtation of
    the `adduser` user but I have yet to see a constructive reply from you
    Marc - constructive in the sense "yes this is a problem and yes I want to improve the life of an `adduser` user".

    So if there's no desire to improve the adduser manpage or adduser with
    respect to the problem at hand then there's no point in spending time discussing it, or am I misunderstanding something?

    I do understand your concern Marc, that any byte published is a byte that
    needs to be maintained. But if that is the argument that tops all the
    others then no change is possible.

    Again: if there's no will to change anything and if that is the top
    argument then there's no point in further discussion.
    *t

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helge Kreutzmann@21:1/5 to All on Mon Apr 28 19:10:01 2025
    This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages.

    Hello Tomas,
    hello Marc,
    hello Jason,
    sorry for comming in late into the discussion, I was offline for some
    days.

    Regarding the translations:
    If desired, I can quickly poll all active translators for the update. Preferrably this week, as I have some time.

    Regarding the proposal:
    I agree that a man page for a command should not be a general
    tutorial. But I would not see this as strict - if there is a more
    general misconception or something helpful for the users, I would
    personally add it. And the last proposal "A logged in user will need
    to log out and log back in for the change to take effect." sounded
    quite sensible to me, not overreaching.

    But in the end, of course, it is Marcs decision.

    Greetings

    Helge

    --
    Dr. Helge Kreutzmann debian@helgefjell.de
    Dipl.-Phys. http://www.helgefjell.de/debian.php
    64bit GNU powered gpg signed mail preferred
    Help keep free software "libre": http://www.ffii.de/

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEbZZfteMW0gNUynuwQbqlJmgq5nAFAmgPtNYACgkQQbqlJmgq 5nDQWg/+IaSf14J52TGapXGMCQBrB0XxlhalaLWomtu+460wFYBwSyrsoJZgOuW7 omEwf3qkxbLVc5CZoyHfHOamd27DJp4CFKlnyvSvukAKGr7lFr81pK3n/uxpWP08 U/1a6VkQqJyrCddC0WmC19XC7QIJhMg8PNGddRg3q9lPvQ5UWQMa2IXAqRAhxeT+ apOHklOQwJ/7V20fmc52VgCdAeGSW4LQCfALMh+D2+MJuMxlTaD3UELbi9ZILahF a4i3qsiMaI7Rb0O6UXpH30RDlFGuutT4/VzKZH5UpodGxJJdjnv1suu/lsc1WeYl H7DpKhibSmlUekV+t23MF6qxbG4fjBniCulABJmZDD0YlmOBafNinbMi0tQWH9i2 eD9XllDBQAtj1oi5C0NMjwcBmEI4Tyw5amThZKZzHH9eK/ixLMsv/jIOPKbotuMd sEY17zBLddSbrLBETFO1B/fUrVGEMl4RKIiyZG9maHCgQX4OALsPMlbqAZ3vq/bQ Ri+XdR7tZbt793aQZjV/URw72kybeSVFyiV5OpgrC4TVUo8PIEuQofQnpBhWhOGC daP4tbIQ3Ohia9G1oa1+9Pb3jCNqjSAKpNdVHY1