Results 1 to 8 of 8
hi all,
i'm logged as user 'lg' and typed
su and prompts for passwd i gave the root passwd and logged into #.
but when i type ifconfig - its ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-14-2007 #1
what's difference bw su and su -root?
hi all,
i'm logged as user 'lg' and typed
su and prompts for passwd i gave the root passwd and logged into #.
but when i type ifconfig - its say no cmd found...but i can see ifconfig in /sbin/bin
then i login again as using,
su - root
now ifconfig works ...why is it so..what's difference between loggin as
su and su - root?
ThanksFirst they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 06-14-2007 #2
su doesn't add path of folders that have root access only in $PATH.
check it:
Code:su echo $PATH exit su - echo $PATH
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 06-14-2007 #3
thanks...yes..PATH varies for two...thanks...but is that the only difference between su and su - and there is no there difference??
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 06-14-2007 #4
If you use "su", you do not inherit any of the users environmental variables and settings e.g. the path whereas using "su -" spawns a new login shell with all the users variables and settings.
- 06-14-2007 #5
'su -' changes the present working directory too. its like dropping you at root shell.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 06-14-2007 #6Just Joined!
- Join Date
- Jun 2007
- Posts
- 1
cool
Cool thread , i am new member to this forum and really liked it
- 06-14-2007 #7
Welcome to the LinuxForums.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 06-15-2007 #8
Thanks guyz..
@ mis333 : welcome to linux forums ...enjoy and happy codingFirst they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org


Reply With Quote
