Hi,
I just noticed a strange bug in the interactive adduser script. Normally there's a functionality to add a user to several additional groups (like lp, floppy, audio, video, cdrom, etc.) by hitting the UP key at one point. And this is what I usually do.
I'm currently writing the chapter about user and group management for my new Linux book, so I'm running a few tests on a vanilla Slackware 14.1 installation. And I just noticed that not hitting the up key for adding the user to additional groups... adds him to these anyway. What I'd expect after adding a user by simply hitting ENTER at the additional groups question would be to only see him or her in the users group. Instead, the user gets added to users, lp, floppy, audio, video, cdrom and scanner (but curiously enough, not plugdev).
Edit: after some more tests, I get some really weird results. I added a user 'kjoly' to a vanilla Slackware system running in a virtual host. I ask adduser not to add this user to any additional groups.
1. When I login as kjoly in init 3, I get this:
Code:
kjoly@slackbox:~$ groups
users lp floppy audio video cdrom scanner
2. When I login as root, I get this:
Code:
root@slackbox:~# groups kjoly
users
3. When I SSH into that virtual installation as user 'kjoly', I get this:
Code:
kjoly@slackbox:~$ groups
users
I have a distinct feeling something is very wrong here.
Edit after some more fiddling. The bug seems to be in the 'groups' command. User kjoly doesn't appear in any additional groups in /etc/group, as expected. But when she issues the 'groups' command, she appears to be a member of lp, floppy, audio, etc.
I added a screenshot so you get an idea of what's happening.
Cheers,
Niki