How do I list all users with admin rights on Linux? I checked file /etc/passwd/, but I dont know how can I figure out which account is privileged. Can you possibly help me a little?
|
migrated from stackoverflow.com Aug 2 '12 at 14:25
|
First, there is However, other users may be given the ability to impersonate
On an Ubuntu system, the root account is generally disabled, which means root doesn't have a password and you can't log into that account, so To find out who generally has sudo privileges, you can view the Beyond this, there are a myriad of "partial-admin" things that can be set up. Root is only an "admin" because it inherently bypasses security checks. If a user has specific permissions for a certain function, then they too are an "admin" over that area; For example, just as you are an admin over your home directory, you can make someone an admin over the webserver, or an admin over the video/audio outputs on the computer (Look up the To summarize, there's not exactly an easy way to get a "list of administrators". However, to quickly get most of them:
|
||||
|
|
On Linux, special privileges are typically supplied through groups. E.g. people in the sudoers group may use sudo, people in the audio group may play audio, etc. Use the |
|||
|
|
|
Using default settings, users that have the right to sudo belong to the group "wheel". Maybe this will lead you in the right direction? |
|||
|
|
|
I thought id put in my two cents... To actually find the admin for a group, you would look at the "group-" file. This file lists all the admins for each group listed. You can only view the contents of this file if you are an admin elevated through "SUDO" or root. The regular group file as others have mentioned will only list general memberships to such listed groups. This is how Slackware or other Slackware distros work, but i do recall seeing other distros having these files. -Ronaldo |
|||
|
|