QUESTION: What Command(s) List a User's System Permissions in Linux?



    Looking for commands that will NOT be seen as aggressive or change the system, meaning that I attempt to change the system OR access file/dir that have standard permissions assigned to XYZ role to "see" if it's possible to do; root, su/sudo, etc.
    Which distro have the same command syntax? For example: (RHEL / Red Hat / CentOS / Fedora), (Debian / Ubuntu Linux), BSD, etc. -- NOTE: This list is NOT in any order, it's just a example, and I'm not looking for comments on which distro is better, just the commands requested.

Thank you!!


RECENT_UPDATE (1): I want to know if the user I'm currently signed in as has rights as root, su/sudo, etc. -- I'm not a Linux person, if I was on WIN-XP the answer would be to go to "START >> CONTROL PANEL >> USER ACCOUNTS" and I would see the system rights that user has; Admin, limited, etc. There other ways, but that's just an example. If there is a better way to ask the question, let me know. What I'm NOT looking for is what permissions I have on a file/folder/etc, I want to type a command-line and get info on the current users system rights, if that makes sense. Thanks!!

RECENT_UPDATE (2): Rewrote the question, posted it to stack-x-superuser, getting better responses: https://superuser.com/questions/197878/how-to-i-document-user-rights-on-an-existing-linux-system

  • 1
    root, su, and sudo don't list user permissions. Clarify the question, please. – pjz Oct 10 '10 at 3:29
  • getent group username will tell you what groups a user is in. – Geraint Jones Oct 10 '10 at 3:36
  • Which users permission do you talk about? – Gopoi Oct 10 '10 at 5:10
  • 1 - If you were on Win XP and followed that procedure you still wouldn't know what rights you have, only what local groups you are in. 2 - This sounds like an end user question and as such doesn't belong on this site. – John Gardeniers Oct 10 '10 at 20:37
  • @John_Gardeniers - Did you read my edit from 6 hours ago >> RECENT_UPDATE (2): Rewrote the question, posted it to stack-x-superuser, getting better responses: superuser.com/questions/197878/… – blunders Oct 10 '10 at 20:41

The groups command will show you what groups the user belongs to, which is about as close as you can get. Essentially, this is the same as with Windows, but Windows has nice friendly named groups like "Administrators", where as Linux has less obvious group names like "wheel".

| improve this answer | |
  • @Jed_Daniels - Appears that this ordinates from BSD, do you know if that apply to all distros, and names of other default groups besides "wheel", which appears to be the group root is in. Would a user with su rights group even change to wheel, if not where would Linux distros store this? Thanks! – blunders Oct 10 '10 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.