Solved

sudocomm

Posted on 2014-02-25
7
107 Views
Last Modified: 2014-10-15
What this command means?


-bash-3.2$ sudo su - oracle
0
Comment
Question by:thomasliju
7 Comments
 
LVL 26

Accepted Solution

by:
pony10us earned 500 total points
ID: 39885902
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
 
LVL 7

Expert Comment

by:Shahnawaz Ahmed
ID: 39885917
It means

taking sudo access for oracle user
Means priviliges of oracle user
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 39885944
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

Expert Comment

by:David
ID: 39888735
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
 
LVL 61

Expert Comment

by:gheist
ID: 39898820
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
 
LVL 26

Expert Comment

by:pony10us
ID: 39900740
Or?

sudo -u oracle -i
0
 

Author Closing Comment

by:thomasliju
ID: 40383697
yes

.profile is correct.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now