Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 122
  • Last Modified:

sudocomm

What this command means?


-bash-3.2$ sudo su - oracle
0
thomasliju
Asked:
thomasliju
1 Solution
 
pony10usCommented:
you are executing a shell as user Oracle and after executing /etc/profile, .profile and .bashrc will end up in the Oracle home directory
0
 
Shahnawaz AhmedCommented:
It means

taking sudo access for oracle user
Means priviliges of oracle user
0
 
omarfaridCommented:
su - oracle means switch user to oracle including running the .profile file to set env, etc.

If you run this command from a normal user account then you will be prompted for oracle user password

If you run the command as root then you are not prompted for oracle password

sudo let you run commands as root and in this case you will switch to oracle user without prompted for oracle password
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
DavidSenior Oracle Database AdministratorCommented:
Hi Thomas.  IMO pony10us comes the closest by calling it a shell, although that implies knowledge of what a shell does.  Likewise Mr. Ahmed and Mr. Farid, I think.  But once again wikipedia has it spot on.  

sudo is an (UNIX/LINUX) operating system that allows a user to execute a command with the security privileges of another user.  Moreover, the set of commands allowed are defined -- so the source user does NOT become the target (super)user.  Numerous Oracle docs on this, one being http://docs.oracle.com/cd/E37670_01/E41138/html/ch22s09.html.

Highlighting the rest of the syntax:

sudo su introduces the ability to switch user (su), in a non-interactive login shell.
sudo su - is one step further, executing the appropriate shell init scripts.  Upon exit, control passes back to the prior session.

Therefore, your answer is that the issuing user session temporarily creates a new interactive session as user oracle.

Can we be of further help?

dvz
0
 
gheistCommented:
sudo su - oracle means that somebody who rote it has no clue

it is equivalent to

sudo -u oracle -s

(and does not call "su" as sudo is superset of su's function)
0
 
pony10usCommented:
Or?

sudo -u oracle -i
0
 
thomaslijuAuthor Commented:
yes

.profile is correct.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now