siginin in as root

General support questions including new installations
Post Reply
duffmckagan
Posts: 45
Joined: 2005/04/11 07:31:19
Location: Doha,Qatar

siginin in as root

Post by duffmckagan » 2005/04/11 08:02:04

i have a broadband connection at my place but that requires me to sign in first

i have installed the software required for the process......

but as a user, how can i login as root from the terminal, and then run the software at command line?

sbassett
Posts: 5
Joined: 2005/02/16 21:18:46
Contact:

siginin in as root

Post by sbassett » 2005/04/12 17:32:36

su - (notice the space between su and the hyphen)
This will log you into a root session until you either 'exit' or close the terminal. The - at the end loads up root environment. From there you will be able to execute any commands needed with roots priveleges. Also look into sudo.

duffmckagan
Posts: 45
Joined: 2005/04/11 07:31:19
Location: Doha,Qatar

Re: siginin in as root

Post by duffmckagan » 2005/04/12 17:57:45

yeah

i tried it out...

sounds weird ........but i was knowing this.....

initially i used to use Suse.....

so in that to sign in as root......i had to type su
so what i thought was the resemblance between su and suse makes it to enter into root env like that?

yeah.....thanks for ur time anyway.

But is there any need of a hyphen?

i could load the root environment without the hyphen as well..........

sbassett
Posts: 5
Joined: 2005/02/16 21:18:46
Contact:

Re: siginin in as root

Post by sbassett » 2005/04/12 18:19:40

The hyphen will load all of the .bash and user specific settings for root. Otherwise the plain 'su' just keeps your environment while giving you temporary super user priveleges. It is best to use the hyphen. This will also load the path environment of root which can sometimes differ from a normal user's path. Extremelly helpful when trying to execute something in a cli.

duffmckagan
Posts: 45
Joined: 2005/04/11 07:31:19
Location: Doha,Qatar

Re: siginin in as root

Post by duffmckagan » 2005/04/13 04:38:17

yeah thanks

i will try that..

Post Reply

Return to “CentOS 4 - General Support”