LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-20-2018, 08:42 AM   #1
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Arrow 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!
 
Old 06-20-2018, 09:07 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
And onebuck just keeps serving up the goods! I'm bookmarking your posting history onebuck!
 
Old 06-20-2018, 01:56 PM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,290
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by jsbjsb001 View Post
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)

Last edited by brianL; 06-20-2018 at 01:59 PM.
 
Old 06-21-2018, 07:54 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,922

Original Poster
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
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!
 
Old 06-21-2018, 09:18 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,290
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by onebuck View Post
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.

Quote:
Originally Posted by onebuck View Post
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.
 
Old 06-21-2018, 09:40 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,922

Original Poster
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member response

Hi,


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


Though, we should get this thread back on topic.
 
Old 06-21-2018, 09:47 AM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; Slackware64-current (VM); Debian 12 (VM)
Posts: 8,290
Blog Entries: 61

Rep: Reputation: Disabled
Yeah...groups. Recently came across this about the wheel group:
https://unix.stackexchange.com/quest...p-get-its-name
 
1 members found this post helpful.
  


Reply

Tags
admin, awk, getent, gid, grep, group, groups, lid, login, passwd, uid


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user belongs to additionnal groups at runlevel 3 gsan70 Slackware 1 09-18-2009 10:10 PM
What are the default groups root belongs to? hadibg Sabayon 2 08-25-2009 06:38 AM
default groups root belongs too Hcman Slackware 2 05-26-2003 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration