debian: adduser doen't add user to many useful groups

I'm just setting up a debian system for the first time in a long while. (I'm typing this on my new debian system.) The initial user that I created is automatically in many important groups: cdrom floppy sudo audio dip video plugdev netdev bluetooth lpadmin scanner silly <== the user gets its own group When I do an adduser for "hugh", I get only two groups: users hugh Why was "silly" not put into group "users"? Why was "hugh" not put into all these empowering groups? Is there a magic shortcut to getting hugh added to all these groups? It seems that console users would want most or all of these groups. Is there a nice guide to which groups allow what actions? What's the normal way of adding users? I read debian documentation saying useradd(8) is low-level and that adduser(8) should be used instead. I don't see a way of telling adduser that the normal desktop user should be enrolled in the appropriate groups. I know how to add a user to a group, one at a time: adduser user group That seem tedious.

Hi Hugh, On Sun, Aug 13, 2023 at 04:12:18PM -0400, D. Hugh Redelmeier via talk wrote:
I'm just setting up a debian system for the first time in a long while. (I'm typing this on my new debian system.)
The initial user that I created is automatically in many important groups: cdrom floppy sudo audio dip video plugdev netdev bluetooth lpadmin scanner silly <== the user gets its own group
When I do an adduser for "hugh", I get only two groups: users hugh
Why was "silly" not put into group "users"?
Why was "hugh" not put into all these empowering groups?
This is new in Bookworm, and I hadn't noticed it until you brought this up. You need to edit /etc/adduser.conf. For Bullseye, and as long as I can remember before that, EXTRA_GROUPS="dialout cdrom floppy audio video plugdev users". However, as a result of your question I've discovered that /etc/adduser.conf has been changed, and now EXTRA_GROUPS="users" in my Bookworm system. It seems that ADD_EXTRA_GROUPS has changed, too. It is 1 on a Bullseys system but 0 on Bookworm. This does not to appear to have prevented my users from being added to "users", though.
Is there a magic shortcut to getting hugh added to all these groups?
Don't know about a magic shortcut, but here is the command to add groups to a user: $ sudo usermod -a -G "group1,group2,group3,....,groupN" hugh [snip]
What's the normal way of adding users? I read debian documentation
Indeed, it is adduser, but with /etc/adduser.conf modified to suit your needs. I have no idea why this change was made in Debian. All the best, -- Znoteer znoteer@mailbox.org

| From: Znoteer via talk <talk@gtalug.org> Thanks for your reply. It seems that I didn't miss anything obvious. It would be good to have a list of the powers granted by each group measurement. This belongs in debian documentation. Unfortunately there are several reasonable places. group(5)? Interesting/inconvenient change to EXTRA_GROUPS. I wonder why? Probably security. | On Sun, Aug 13, 2023 at 04:12:18PM -0400, D. Hugh Redelmeier via talk wrote: | > Is there a magic shortcut to getting hugh added to all these groups? | | Don't know about a magic shortcut, but here is the command to add groups to a user: | | $ sudo usermod -a -G "group1,group2,group3,....,groupN" hugh I found a hack easier. Just use a text editor's global search and replace silly$ with silly,hugh. Except for group silly.

On Sun, 13 Aug 2023 at 18:43, D. Hugh Redelmeier via talk <talk@gtalug.org> wrote:
| From: Znoteer via talk <talk@gtalug.org>
Thanks for your reply. It seems that I didn't miss anything obvious.
It would be good to have a list of the powers granted by each group measurement. This belongs in debian documentation. Unfortunately there are several reasonable places. group(5)?
Interesting/inconvenient change to EXTRA_GROUPS. I wonder why? Probably security.
| On Sun, Aug 13, 2023 at 04:12:18PM -0400, D. Hugh Redelmeier via talk wrote:
| > Is there a magic shortcut to getting hugh added to all these groups? | | Don't know about a magic shortcut, but here is the command to add groups to a user: | | $ sudo usermod -a -G "group1,group2,group3,....,groupN" hugh
I found a hack easier. Just use a text editor's global search and replace silly$ with silly,hugh. Except for group silly.
Thanks for walking through the details everyone. It's something I'd wondered about and never pursued - good to know the ins-and-outs. -- Giles https://www.gilesorr.com/ gilesorr@gmail.com
participants (3)
-
D. Hugh Redelmeier
-
Giles Orr
-
Znoteer