LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-28-2011, 05:59 PM   #1
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
How do I list group administrators?


I've added an administrator to a group with gpasswd -A. Is there a way to retrieve the list of admins from a group?
 
Old 11-28-2011, 06:48 PM   #2
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
You can try this:

Code:
cat /etc/group
or, to be more specific, do this:

Code:
cat /etc/group | grep -i "Administrator"
 
Old 11-28-2011, 08:33 PM   #3
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Original Poster
Rep: Reputation: 48
Groups can have administrators. This is what I need to know. Which users are administrators of which groups. Not users who are a member of the group administrators, which doesn't exist on my system.
 
Old 11-28-2011, 08:38 PM   #4
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
ooh I totally read the original post wrong.

Administrators of a group... I have never heard of such a thing. Groups are groups because users of a group have different permissions than users of other groups. Anyone of a particular group should always have the same permissions.

Now, if you wanted to create an "Administrator" of a group, I would do it this way:

1. Create a group of users who has permissions to do certain things in a certain area.
2. Create another group of users who has those same permissions, but also extended permissions to perform administrative tasks.

Setting up your groups this way takes away the headaches of having to modify user permissions individually; it allows you to modify all permissions at a group level. You never want to individually manage users in a large organization as it requires too much administrative overhead.

Forgive me if I sound like I'm trying to educate you, but as an enterprise-grade systems administrator/network engineer, this is the only efficient way to get the job done.
 
Old 11-28-2011, 10:11 PM   #5
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Original Poster
Rep: Reputation: 48
Thanks for you suggestions. However this is not quite what I'm after.

I want to have group administrators that can add or remove users of their group as they see fit. This can be achived with "gpasswd". Eg:
Code:
gpasswd -A lennon beatles
would make lennon administrator of beatles.

Since this function is built in to *nix, I thought there must be a way to list the admins of a group. The man pages and the Googler are strangely silent concerning this...

EDIT: Just found the answer! The group admins can be seen in /etc/gshadow.
Helpful:
Code:
man gpasswd
man gshadow

Last edited by mattydee; 11-28-2011 at 10:19 PM.
 
  


Reply



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
how to list all members of a group bg108 Linux - Newbie 12 11-24-2013 03:26 AM
How do I usermod a list of users into a group? Mongul Linux - General 4 11-16-2011 07:51 AM
the group list was invalid paruhang Linux - Newbie 2 10-29-2011 12:08 PM
group administrators ?? kirtikjr Linux - Software 3 07-12-2007 05:15 PM
users list in /etc/group Milosevic Slackware 6 11-10-2005 11:30 AM

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

All times are GMT -5. The time now is 05:03 PM.

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