I had a question on users inheriting SUDO capabilities of another account. Let's say that there are three users A, B, and C. A has access to Sudo into B. B has access to Sudo into C. Does this give A access to sudo into B and then sudo into C.
A -> B
B -> C
A -> B -> C ?
Another example. My config in Sudoers file are as follows:
root ALL=(ALL) ALL
userA ALL=(root) ALL
Would the configuration allow userA to SU to root and then SU into all other accounts??
I tried googling it but all I kept getting was ways to setup the sudoers files. Any help would be appreciated.
Would the configuration allow userA to SU to root and then SU into all other accounts??
Yes it would. But since root virtually owns everything anyway, once somebody has root access they own the entire box. So why worry about going into another account, other than to cause problems with email masquerading or something like that?
Giving root the way you did is a terrible idea. The idea behind sudo is 'least privilege' - give UserA just the access they need, absolutely nothing more.
The account userA can directly issue:-
..... indeed anything you can think of. Yes, it might be logged via syslog, but they can edit the output to cover their tracks. You effectively have userA as a full privilege account. What does userA actually need to do?
If you are nervous of (and should be) giving out commands such as cp, rm, mv, vi, ftp etc. (especially as you can escape to a shell in the latter two) because you can then attack everything, then script up what is allowed and give them access to sudo-execute (not alter) the script meaning that they don't have direct access to the commands.
Give away as little as possible, after all it's you that will have to put it all back together again if they break something (intentionally or in error) if you still have a job. I don't want this to be scary, but would you give a local builder full access to your bank account to and trust them only to withdraw what they are owed?
I have similar issue as mentioned in
167174-how-run-script-using-batch-file.html
It works good, but the control is not coming back to source i tried adding exit to remote script.
Thanks,
Suresh (0 Replies)
Hi,
I have given access to user mwadmin in shudders file as :
mwadmin ALL:NOPASSWD:/www/* /usr/* /opt/*
However, not able to execute below command:
sudo mkdir -p /usr/test
password for mwadmin:
Sorry, user mwadmin is not allowed to execute '/bin/mkdir -p /usr/test' as root.
... (4 Replies)
Install the sudo pkg SFWsudo.tar
bash#tar -xvf SFWsudo.tar
bash#pkgadd -d . SFWsudo
path may be /opt/sfw/bin
Make entry the user name in sudoer file
path of the sudoer file
/opt/sfw/etc/sudoers
check with the below command as a user (not as a root user)
user1$... (1 Reply)
I want to give root access to a user called denielr on server - tsprd01, but do not want to share root password. I have sudoers configured already.
He should have all access equal to root. I made this entry in /etc/sudoers, but it is not working
denielr tsprd01 =(root) NOPASSWD: ALL
I tried to... (2 Replies)
Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Hi Folks,
Please help me. I am bit struck here.
Here is the OS info.
Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
I have a... (17 Replies)
I'm actually working with a Ubuntu-System here and have a question about executing a command with 'sudo'.
I tried and got a error message like "not allowed".
After this I logged in with 'sudo -s' and typed the command without 'sudo'. This worked well.
Can please somebody explain me this... (0 Replies)
Hello All,
I want to create a script that will do ONLY su to any user on the server with hpadmin login using sudo. Can anyone let me know how can it do it.
Regards
Ankit (1 Reply)
I have installed sudo on AIX 6100-04 and want to know how do I set it up for a user to be able to run only some commands? I want to give the user the rights to only cd to certain directories and run the ls command to name a few? Are there any issues with running sudo when the user is forced to... (2 Replies)
Hi All,
I got lots of request with sudo, a manager request, verbal command, do this and do that.
The problem with this kind of request is when I added that script and that. It will not be perfect, it's because I can't verify the userid sudo access, I can't reset their password as well, I... (2 Replies)
I just need to know what should be done on a login user so that no one can access it except through sudo
i.e.
telnet server
login: user
NO ACCESS
telnet server
login: mylogin
sudo - user <any command>
ACCESS GRANTED
thanks (0 Replies)