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

98,336

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".

Share:
98,336

Related videos on Youtube

blunders
Author by

blunders

Updated on September 17, 2022

Comments

  • blunders
    blunders over 1 year

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

    CURRENT_OS: CentOS-5.X

    MORE_INFO/QUESTIONS:

      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

    • pjz
      pjz over 13 years
      root, su, and sudo don't list user permissions. Clarify the question, please.
    • Geraint Jones
      Geraint Jones over 13 years
      getent group username will tell you what groups a user is in.
    • Udaya Bhanu
      Udaya Bhanu over 13 years
      Which users permission do you talk about?
    • John Gardeniers
      John Gardeniers over 13 years
      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.
    • blunders
      blunders over 13 years
      @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
    blunders over 13 years
    @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!