Show / Show User Authorities
Show User Authorities
Use the 'show grants for {{username}};' command to view all privileges assigned to a specific user.
$
Terminal show grants for <username>; show grants for <username>; #!/bin/bash
# Show User Authorities
show grants for {{username}}; import subprocess
# Show User Authorities
# Make sure to replace <placeholders> with actual values
def run_command():
cmd = [
"show",
"grants",
"for",
"<username>;"
]
try:
print(f"Executing: {' '.join(cmd)}")
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Error: show not found. Please install it first.")
if __name__ == "__main__":
run_command() When To Use
Auditing user permissions before making system changes.
Terminal Output
Expected runtime feedback
>
Output GRANT SELECT ON database.table TO 'username';
GRANT INSERT ON database.table TO 'username';
GRANT UPDATE ON database.table TO 'username'; Command Breakdown
What each part is doing
-
show - Base Command
- The executable that performs this operation. Here it runs Show before the shell applies any redirect operators.
-
<username> - username
- The user value supplied to this command.
How To Run
Execution path
- Step 1
Replace {{username}} with the actual username.
- Step 2
Run the command 'show grants for {{username}};'.
- Step 3
Review the output for user privileges.
Alternative Approaches
Comparable commands in other tools
Alternative security tools for the same job.
John / Crack Password Hashes Custom Wordlist
john --wordlist=<path/to/wordlist.txt> <path/to/hashes.txt> Aws / List Iam Users aws iam list-users Aws / List Policies aws iam list-policies Aws / List Iam Groups aws iam list-groups Aws / Describe Iam Policy aws iam get-policy --policy-arn arn:aws:iam::aws:policy/<policy_name>