View previous topic :: View next topic |
Author |
Message |
taveren Tux's lil' helper
Joined: 24 Jul 2002 Posts: 145 Location: London, Ontario
|
Posted: Mon Oct 21, 2002 6:32 pm Post subject: The command "groups" and "usermod" |
|
|
These commands don't seem to be acting the way they should on my Gentoo 1.4 system. Observe:
Code: |
rwest@ren temp $ id
uid=1000(rwest) gid=100(users) groups=100(users),10(wheel),19(cdrom),80(cdrw)
rwest@ren temp $ groups
users wheel cdrom cdrw
rwest@ren temp $ groups rwest
wheel cdrom cdrw users
|
Why does the second command change the order in which the groups appear? I first noticed this because I was tring to add my user to the group "cdrw" so I could setup permissions for burning CDs. Running the following command didn't do what I expected:
Code: |
usermod -g users -G wheel,cdrw,cdrom rwest
|
That should have set the users primary group to "users", with each of the other groups as secondary groups. Running "groups rwest" after that command however, showed otherwise:
Code: |
groups rwest
wheel cdrom cdrw users
|
Anyone have an idea whats going on here?
I'll note that Solaris, Red Hat 7.2, and OpenBSD all respond properly. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Oct 21, 2002 7:02 pm Post subject: |
|
|
All I can say is that I looked at the source for groups.c in the shadow package, and it only appears to reorder and put the primary group first if no username is specified. If an explicit username is given, it prints the groups in found order, which I would expect to be numeric gid order. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|