user administration

hi '

i am creating a primary group and a secondary group for a user.

#groupadd -g 101 test
#groupadd -g 102 test1

#useradd -d /export/home/user1 -m -s /bin/ksh -g test -G test user1

in /etc/passwd i can find the username as user1 and group name as test
and where can i find the secondary group details...

should be -g test(primary group) -G test1 (secondary group)

where can i find the details about the secondary group

To see a list of groups that a user belongs to, try the following:

bash-3.00# groups agray
sysadmin dba etc

I believe that the primary group is listed first - but don't quote me on that :slight_smile:

You can also check for information on a list of users:

bash-3.00# groups agray otheruser otherotheruser
agray: sysadmin dba etc
otheruser: dba
otherotheruser: etc etc3 blah

or from a list of users in a file

bash-3.00# for user in `cat list`; do echo "$user: `groups $user`"; done
agray: sysadmin dba etc
otheruser: dba
otherotheruser: etc etc3 blah

use the command It will show you the primary and secondary group

id username

to run this command you have root access, OK

Thanks
Pravin :b: