cancel
Showing results for 
Search instead for 
Did you mean: 

'su - root' and 'su root'

 
SOLVED
Go to solution
kunjuttan
Super Advisor

'su - root' and 'su root'

What is the differnce between 'su - root' and
'su root' ??
7 REPLIES
Torsten.
Acclaimed Contributor

Re: 'su - root' and 'su root'

With "-" the profile will be executed.

man su

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
kunjuttan
Super Advisor

Re: 'su - root' and 'su root'

Thanks,but what will be the difference if profile is executed or not??
Steven Schweda
Honored Contributor
Solution

Re: 'su - root' and 'su root'

> Thanks,but what will be the difference if
> profile is executed or not??

A non-psychic might need to see what is in
the user's "~/.profile" file before he could
answer that.
Vishu
Trusted Contributor

Re: 'su - root' and 'su root'

Hi,

su allow one user to become other user without logging out.

Without -, su allow one user to become other user and retain its exported environment.

With -, su allow one user to become other user and change the environment what would be expected if that user actually log into.

I hope it clear your doubt.

Thanks
James R. Ferguson
Acclaimed Contributor

Re: 'su - root' and 'su root'

Hi:

You REALLY need to begin reading the manpages and the wealth of documents at:

http://docs.hp.com/index.html

Your questions are basic ones. Searching for the answers yourself will teach you more than flooding this Forum with queries.

Your questions are NOT related to LVM and should be posed (for the most part) in the "General" or "System Administration" family.

This site is not meant as pre-certification or interview test service. I regret to say that you seem to be using it as one or the other.

...JRF...
Scott Lindstrom_2
Regular Advisor

Re: 'su - root' and 'su root'

You could write an HPUX book just by reading dipeshvasudevan's questions and all the replies.
kunjuttan
Super Advisor

Re: 'su - root' and 'su root'

Thanx buddies...