LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-19-2004, 12:54 PM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Rep: Reputation: 47
The different type of roots


When I want to go to the root, I write the following:

su - root and press enter
Then I get the following message.
password:

I write my password : nicosiar and press enter

This way I am in the root.

[root@h27n2fls301o1037 root]#
--------------------------------------------------------------------------

I can do the same thing in different way.

First I write su and press enter
Then I get the following message
password:

I write the password: nicosiar and press enter
Now I am in a different root.

[root@h27n2fls301o1037 heden]#

My question is what is the difference between the two different roots?

I have seen that just writing su would be enough to go to the root when installing software.
What are those differences?
 
Old 12-19-2004, 01:57 PM   #2
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149

Rep: Reputation: 23
You aren't in a different root, but your environment (the variables and their values) are different.

With just "su", you keep your present environment. With "su -", it's as though you logged in as root - any environment variables you had are (temporarily) tossed, and you pick up the same ones root has if it logged -n - you actually run the same files (.bash_profile etc.)

By the way, if you are root, you can "su - someotheruser" to login as that user without knowing their password.

--
Tony Lawrence
http://aplawrence.com
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Two roots? revenge80200 Yoper 0 01-29-2005 06:55 PM
Installpkg and different roots pcause Slackware 2 08-12-2003 02:21 PM
roots password expired. wlfdgcrkz Linux - Software 2 06-19-2003 07:50 AM
2 roots in Linux box mikeshn Linux - Newbie 4 03-01-2002 03:02 PM
How do I change roots umask? 360 Linux - Networking 1 02-19-2002 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration