Find the answer to your Linux question:
Results 1 to 7 of 7
HI Frndz I have a halt with doubt frndz. I am using putty to connect my RHEL-4, but If I want to know all the users present in a group, ...
  1. #1
    Linux Newbie
    Join Date
    Aug 2008
    Posts
    119

    How to find USERS in GROUP ?

    HI Frndz

    I have a halt with doubt frndz. I am using putty to connect my RHEL-4, but If I want to know all the users present in a group, How can I ?
    when I use the following command, It shows the below error..!!

    # system-config-users

    system-config-users requires a currently running X server.


    What shoud I do..?

    Thanks in Advance

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    use groups command
    Code:
    groups <user>

  3. #3
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Code:
    #grep <groupname> /etc/group
    Output will show <groupname>:<encrypted password for group (if needed)>:<group id>:<comma separated list of users belonging to that group>

    e.g.
    Code:
    # grep wheel /etc/group
    wheel:x:10:root

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149

    yeah, i'm dumb, i misread that and gave the wrong answer

  5. #5
    Linux Newbie
    Join Date
    Aug 2008
    Posts
    119
    Thanks for reply Frndz

    But, When I used the command

    #grep wheel /etc/group
    wheel:10:root

    I got the above thing but I have a group called big and users A,B and C when I use the command like this

    #grep big /etc/group
    big:500:

    I got only the above am not able to view user's in it

  6. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    that means there are no users in the group

  7. #7
    Linux Newbie
    Join Date
    Aug 2008
    Posts
    119
    No my Frnd

    when am using this command it display cool

    #groups <user name>

    It shows the user and group but when I used this one

    #grep <group name> /etc/group

    It display nothing except

    big:500:

    Thanks in Advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...