Thanx a log for your replies :) I was also using the wrong command for the EXISTING user katia: pico@hive:~$ sudo useradd -G guest katia useradd: already a `katia' user
Now: pico@hive:~$ sudo usermod -G guest katia pico@hive:~$ groupinfo guest name guest passwd * gid 31 members root katia So user 'katia' was in primary and now is in secondary too! I can't say I understand the use of primary and secondary. I remember when I created user 'user' with useradd and entered 'wheel' when prompted for the login group, I didn't gain any sudo powers. (primary) It was only untill I did: usermod -G wheel user that I gained sudo powers (sencondary as I understand it). Mike On Sat, May 7, 2011 at 6:01 PM, Antoine Jacoutot <ajacou...@bsdfrog.org> wrote: > On Sat, 7 May 2011, Stuart Henderson wrote: > >> Yes this is expected behaviour. /etc/group lists secondary group >> memberships, /etc/passwd (and related files) list the primary groups. >> >> Most of the tools you're using to investigate group membership >> (groupinfo, getent etc) only list secondary groups. >> >> "id katia" is showing first the primary group (gid=31), and then a >> list of all groups this user has permissions for (either primary >> or secondary). > > When you use useradd -g =uid, the primary group is created and the user > put into it. > > # groupadd kiki > # useradd kiki > # groupinfo kiki > name kiki > passwd * > gid 1001 > members > > versus > > # useradd -g =uid kiki > # groupinfo kiki > name kiki > passwd * > gid 1001 > members kiki > > -- > Antoine