One way to view all users of a group is (assuming csh) :
-first find the <group_id> , for example : cat /etc/group | grep <group_name>
(the result has the <group_id> number after <group_name>)
-then list all users of this group , as follows : cat /etc/passwd | grep <group_id>
Each line of your output will contain:<userna me> of that group, encrypted password, the <user_id>, the <group_id> , <home_dir> path and <login_shell>
-----------------------------------------------------------------------------------------------------------
Example on HPUX , with group called users having 2 users ifour and rt:
i4hp_user[12] cat /etc/group | grep users
users::20:root
i4hp_user[13] cat /etc/passwd | grep 20
ifour:s4dsKumlJ WlcQ:3100:20::/home/ifour:/bin/csh
rt:qeNwoqnPuEnG E:3001:20:realt ime development,,,:/home/rt:/bin/csh
i4hp_user[14]
----------------------------------------------------------------------------------------------------------
what is the command to extract or view all users in a group
in linux server.
cud anyone help with this. thnx