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

Reply via email to