December 9th, 2013, 01:22 PM
How to check which users have access to root and su command
Is their a way by which i can know all the users who have access to su and root command ?
December 10th, 2013, 05:27 AM
The actual location may vary depending on version (generally it will be /etc/sudoers) but you will want to check the contents of the sudoers file. Some implementations provide an editor (can't remember the command - I think its is visuodo, but it adds a syntax check on top of vi for you) but a man sudoers will give you the info you need to track it down.
Once you have found the file you can examine it and find out who can do what - cross-referncing the data with the man page for sudoers to see what is what.
Comments on this post
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
December 11th, 2013, 03:31 PM
Depends on whether you mean 'su' or 'sudo'. If it's the latter, then when Simon says above looking at 'sudoers' will tell you what you need to know. If you don't have any aliases defined, then look for lines that have something like
As that line says that I have access to all run any commands as the root user using 'sudo'.
aitken325i ALL=(ALL) ALL
However, if it's 'su', then you're looking at anyone who knows the root password. Looking through '/var/log/secure' will tell you who has become the root user and when using the 'su' command.
The No Ma'am commandments:
1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
2.) It is wrong to be French
3.) It is O.K. to put all bad people in a giant meat grinder
4.) Lawyers, see rule 3
5.) It is O.K. to drive a gas guzzler if it helps you get babes
6.) Everyone should car pool but me
7.) Bring back the word 'stewardesses'
8.) Synchronized swimming is not a sport
9.) Mud wrestling is a sport
January 18th, 2014, 06:46 AM
and look for the sudo group
But firstly You should follow aitken and Simon responses bcoz these are the experienced person here ...