Dev_Dev
September 16, 2011, 6:25am
1
Hi,
I have few doubts regarding "sudo" command. It acutally allows access to other commands as a different user. It stands for "superuser do".
Now, we execute a command as
sudo su - oracle
Can you please tell me what does it do actually, thank you.
ctsgnb
September 16, 2011, 6:29am
2
If you are allowed to run :
sudo su - oracle
then it runs the command
su - oracle
with root privilege, so it allow you to switch to oracle user without having to provide the password of oracle user account
vbe
September 16, 2011, 7:29am
3
I will add the - sign there is so it executes the .profile of the user in order to have his environment... in other words without - you would just "be" oracle from then on but without his environment ( most certainly most admin commands of a DBA would not load etc...)
You may want to check out your sudoers (/etc/sudoers) file. That would specify the rules for sudo on your system.
Dev_Dev
September 17, 2011, 4:09am
5
Thank you all, it is quite useful.
---------- Post updated at 03:09 AM ---------- Previous update was at 02:58 AM ----------
Hi,
What are all the other commands, which can be executed through 'sudo', please share more details, thank you.
Pretty much any command can be executed using sudo. Just depends on how it was implemented on your system.
dev_dev:
What are all the other commands, which can be executed through 'sudo', please share more details, thank you.
sudo is configurable. /etc/sudoers determines who can execute what commands with it.