LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Closed Thread
 
Thread Tools
Old 10-26-2009, 12:28 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 78
Thanked: 0
What is different between su <username>and su - <username>


[Log in to get rid of this advertisement]
Hi guys,

What is different between su <username>and su - <username>

Is there any other options available to switch user.
windows_xp_2003 pinga123 is offline    
Old 10-26-2009, 01:24 AM   #2
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware 13, Solaris
Posts: 45
Thanked: 0
su <username> still uses your environment, but su - <username> uses the environment that would be expected if the user actually logged in as the specified user.

change to the same user w/ and w/o the - option and compare the environment, you'll see the differences.

-gibb
linux ubyt3m3 is offline    
Old 10-26-2009, 03:04 AM   #3
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 269
Thanked: 0
Also, try man su to read the differences
linuxfedora rhoekstra is offline    
Old 10-26-2009, 05:26 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris, under a rock ...
Distribution: Solaris & OpenSolaris based distros, Ubuntu
Posts: 8,138
Thanked: 86
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate of http://www.linuxquestions.org/questi...ername-764449/
solaris jlliagre is offline    

Closed Thread

Bookmarks


Thread Tools

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why "bash-2.05b$" in Terminal instead of "username@localhost username" jayelitumbiolo Linux - General 9 10-04-2009 04:16 AM
How can I match username from username/ ? abefroman Linux - Newbie 2 04-26-2009 10:10 PM
fedora 8 asking username but during installation i dint give any username ?? herevenku Linux - Newbie 2 08-25-2008 05:37 AM
Differance between su <username> and su <username> - guguma Linux - General 3 08-19-2007 02:01 PM
useradd: invalid username username$ engyeow Fedora 5 12-05-2004 05:35 AM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration