Link to home
Start Free TrialLog in
Avatar of Pau Lo
Pau Lo

asked on

command to determine rights of currently logged in account (RHEL 6.8)

is there any quick command that can be run via putty once connected to a RHEL server, to determine the privileges granted to that account you are logged in with, e.g. is it a root account, does it have su/sudo privileges etc. I have been given an account to a test server for some security checks, but I am pretty sure a lot of it is not completing as the account has limited privileges. But as it is a fairly new area to me, I could do with a quick command you can run via putty once connected with this account to list what security privileges it actually does have.
ASKER CERTIFIED SOLUTION
Avatar of Bernie Bsen
Bernie Bsen
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pau Lo
Pau Lo

ASKER

via putty can you show a command to reveal the contents of these files to the terminal or to a file:
/etc/passwd
/etc/group
Avatar of Pau Lo

ASKER

sussed it, more /etc/passwd more /etc/group got me what I needed.
Actually 2x steps.

1) Run the id command to determine effective user/group for login.

net14 # id 
uid=0(root) gid=0(root) groups=0(root)

Open in new window


2) Then go through Bernie's comment about looking at /etc user/group files.

Just be sure to ensure you're working with the correct user/group id, for your starting point.