LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How To Check Which Groups A User Belongs To On Linux (https://www.linuxquestions.org/questions/linux-general-1/how-to-check-which-groups-a-user-belongs-to-on-linux-4175632297/)

onebuck 06-20-2018 08:42 AM

How To Check Which Groups A User Belongs To On Linux
 
Hi,

Another informational article for LQ members to have reference too.

How To Check Which Groups A User Belongs To On Linux
Quote:

by Prakash Subramanian · Published : June 19, 2018 || Last Updated: June 19, 2018

Adding a user into existing group is one of the regular activity for Linux admin. This is daily activity for some of the administrator who’s working one big environments.
Even i am performing such a activity on daily in my environment due to business requirement. It’s one of the important command which helps you to identify existing groups on your environment.
Also these commands helps you to identify which groups a user belongs to. All the users are listed in /etc/passwd file and groups are listed in /etc/group.
Whatever command we use, that will fetch the information from these files. Also, each command has their unique feature which helps user to get the required information alone.
Some members may find this information redundant but there are LQ members who may need to be aware of this information.

Quote:

"Knowledge is of two kinds. We Know a subject ourselves, or we know where we can find information upon it."- Samuel Johnson
Please consider using the 'man command' to get familiar with a particular command & options.

Hope this helps.
Have fun & enjoy!
:hattip:

jsbjsb001 06-20-2018 09:07 AM

And onebuck just keeps serving up the goods! I'm bookmarking your posting history onebuck! :hattip:

brianL 06-20-2018 01:56 PM

Quote:

Originally Posted by jsbjsb001 (Post 5869668)
And onebuck just keeps serving up the goods!

Yeah, he's LQ's answer to Wikipedia. ;) :)
I've only ever used id:
Code:

brian@slackdesk2:~$ id
uid=1000(brian) gid=100(users) groups=100(users),5(tty),7(lp),11(floppy),14(uucp),16(dialout),17(audio),18(video),19(cdrom),83(plugdev),84(power),86(netdev),93(scanner),999(vboxusers),1000(burning)


onebuck 06-21-2018 07:54 AM

Member response
 
Hi,

brianL, just trying to help fellow LQ members who may need some guidance to information to help with their Gnu/Linux experience.

Nice to see your back and posting style was missed. :)
Quote:

Good manners is the art of making those people easy with whom we converse. Whoever makes the fewest persons uneasy, is the best bred in the company.”- Swift
Hope this helps.
Have fun & enjoy!
:hattip:

brianL 06-21-2018 09:18 AM

Quote:

Originally Posted by onebuck (Post 5870100)
Hi,

brianL, just trying to help fellow LQ members who may need some guidance to information to help with their Gnu/Linux experience.

Yeah, you're doing a great job, Gary. Keep it up. :hattip:

Quote:

Originally Posted by onebuck (Post 5870100)
Nice to see your back and posting style was missed. :)

Thanks. I tend to go off sulking & muttering bad things about political-correctness, lack of sense of humour, and one-track minds whenever I get a warning from moderators. ;)

onebuck 06-21-2018 09:40 AM

Member response
 
Hi,


Not a warning from me, just glad to see your back.


Though, we should get this thread back on topic.
:hattip:

brianL 06-21-2018 09:47 AM

Yeah...groups. Recently came across this about the wheel group:
https://unix.stackexchange.com/quest...p-get-its-name


All times are GMT -5. The time now is 06:13 PM.