I already gone through with old post regarding listing the group members and tried the command
getenv group other
the result is
other::1:root
i listed my part of the /etc/passwd file below
test1:x:100:1::/home/test1:/bin/sh
test2:x:101:1::/home/test2:/bin/ksh
test3:x:102:1::/home/test3:/bin/ksh
the above three users belong to the other group but the username are not listed in the result.
please let me know the correct way of listing the group members
Note : i think the genent command is just fetch the string from the /etc/group file.But in the group fiile the last field "user list" only list the secondary users of the group.but i like to list the primary group of the users. please let me know any other way to list the group members
Thanks for your reply.Will your command provide the answer for only loged in users or it will list all the users in that group (including those are not logged in)...
Thanks seg for the tip. I had forgotten the logins command.
vr_mari: not sure about why you insist telling you use getenv while the output clearly shows you run getent. By the way, getent not only look in the /etc files but also in whatever remote database (nis, ldap, ...) might be declared in nsswitch.conf.