Show user groups (to which given unix user belongs)

By neokrates, written on May 3, 2010

bash   snippet

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 29 views
Rate it
Ad
Poll
  • The setup of your CI environment is?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Usage: /usr/bin/groups [OPTION]... [USERNAME]...

 
Example:

Show groups for three users:
$MY_USER $HIS_USER $ONE_MORE_USER

groups $MY_USER $HIS_USER $ONE_MORE_USER
Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'
TAGS
No tags for this post.
RELATED
Pages
Posts
SOCIAL
Be Sociable, Share!

2 Responses to “Show user groups (to which given unix user belongs)”

  1. MichaelNut says:

    I added a user to a group, and then I type the groups command, but the addition doesn t show up in that list. When I look at the groups file, the user name is in fact listed under that group. Any ideas as to why that would be?

    • admin says:

      How exactly did you add the user? (post the command(s) from the >history output pls ). Which Linux are you running? Is the box / VM instaleld by you or other people working with it as well?

Leave a Reply