viewing group membership

Posted on 2005-04-13
Last Modified: 2012-05-05
Is there an easy way in Linux, to list who is a member of a specific group?
Also, is it possible to list what members are a part of what group?

Currently I'm viewing the /etc/group and /etc/passwd to get this info. Didnt know if there was a more robust way
Question by:dissolved
    LVL 16

    Accepted Solution

    If possible, you could use the groups command.
    groups <userid>

    shows the groups that the use belongs to

    Author Comment

    thats the command I was looking for thanks. I kept trying  group <username> and it wasnt working. Forgot the "s" on the end.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now