sudo - command usage

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers sudo - command usage
# 1  
Old 09-16-2011
sudo - command usage


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.

Last edited by vbe; 09-16-2011 at 08:30 AM..
# 2  
Old 09-16-2011
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
This User Gave Thanks to ctsgnb For This Post:
# 3  
Old 09-16-2011
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...)
This User Gave Thanks to vbe For This Post:
# 4  
Old 09-16-2011
You may want to check out your sudoers (/etc/sudoers) file. That would specify the rules for sudo on your system.
This User Gave Thanks to ShawnD41 For This Post:
# 5  
Old 09-17-2011
Thank you all, it is quite useful.

---------- Post updated at 03:09 AM ---------- Previous update was at 02:58 AM ----------


What are all the other commands, which can be executed through 'sudo', please share more details, thank you.
# 6  
Old 09-19-2011
Pretty much any command can be executed using sudo. Just depends on how it was implemented on your system.
# 7  
Old 09-19-2011
Originally Posted by 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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SUDO command in script

hi, can some one explain the sudo -n equivalent in AIX Thanks Venkat K (5 Replies)
Discussion started by: venky.b5
5 Replies

2. Shell Programming and Scripting

ssh sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ ssh sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

3. Red Hat

Sudo command configs

I am wondering how to use SUDO command to allow only my account to run mount command as root. I have root privilege.:confused: (4 Replies)
Discussion started by: almirzaee
4 Replies

4. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

5. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

6. UNIX for Advanced & Expert Users

Sudo command

Hello, What does the below sudo command provide access to, does it allow a user to su to any other user except root. sudo !/usr/bin/su * (1 Reply)
Discussion started by: sophos
1 Replies

7. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

8. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

9. Solaris

Sudo for a command

I am trying to set up sudo for a command, but do not want to specify the arguments that can be passed into it. I want the user who is using sudo to be able to pass in the arguments they want. I am fairly sure I know how to do this with RBAC in Solaris 10, but for reasons I will not get into I... (1 Reply)
Discussion started by: synchro
1 Replies

10. Cybersecurity

Sudo Usage level

Hi Admins, I have a Security question here. We have a bunch of users ( around 25) who needs to have sudo capabilities to run some jobs. I add them in the sudoers list, once confirmed their intention. Now im having a headache, who is accessing another persons home directory and who is... (2 Replies)
Discussion started by: killerserv
2 Replies
Login or Register to Ask a Question