LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 10-26-2009, 12:28 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 605
Blog Entries: 2

Rep: Reputation: 36
What is different between su <username>and su - <username>


Hi guys,

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

Is there any other options available to switch user.
 
Old 10-26-2009, 01:24 AM   #2
ubyt3m3
Member
 
Registered: Apr 2008
Distribution: Slackware64 13.1, Solaris 10, RHEL5/6
Posts: 86

Rep: Reputation: 19
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
 
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: 296

Rep: Reputation: 32
Also, try man su to read the differences
 
Old 10-26-2009, 05:26 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,089

Rep: Reputation: 227Reputation: 227Reputation: 227
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/
 
  


Closed Thread


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are 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 09:19 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration