LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2002, 09:29 PM   #1
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Rep: Reputation: 30
what is su?


what is su?
 
Old 08-20-2002, 09:30 PM   #2
krazycow1
LQ Newbie
 
Registered: Aug 2002
Posts: 10

Rep: Reputation: 0
su stands for superuser
 
Old 08-21-2002, 12:22 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally posted by krazycow1
su stands for superuser
actually its stands for substitute user according to the man pages.. but its mainly used to su to root, so superuser it can be called as well.
 
Old 08-21-2002, 06:07 AM   #4
Sfin
Member
 
Registered: Apr 2002
Location: Michigan
Distribution: Slackware 8.0
Posts: 197

Rep: Reputation: 30
Like trickykid said,

it stands for substitute user, and from the name you can figure out what it does.

if you do a:

su

it will default to switching to root, but you can also use it this way:

su <user name>

for example I usually do a su (to become root) to edit some configuration files, then use su <my user name> to go back to my own username, since being root always is not a very good idea.

consult the man pages for more details.
 
Old 08-21-2002, 06:23 AM   #5
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
Quote:
Originally posted by Sfin
for example I usually do a su (to become root) to edit some configuration files, then use su <my user name> to go back to my own username, since being root always is not a very good idea.

consult the man pages for more details.
You can also simply type exit to go back to user.

Anne
 
Old 08-21-2002, 12:50 PM   #6
ryandelany
Member
 
Registered: Dec 2001
Location: Orange County, CA
Distribution: RedHat 7.2, 7.3, 8.0
Posts: 66

Rep: Reputation: 15
su will allow you to switch between users without having to logoff/logon again as that user. One more thing not mentioned above is that if you want to inheret the permissions of the user you are switching to, you need to use the - switch like so:

su - username

If you don't do that, you often times won't be able to run commands or have access to things that you normally would as that user.

Also, in the example above where the person su'd to root, then su'd back...you are still leaving a running root session open which can be a security problem and it takes up inodes, etc. You are better off typing exit when you are done.

Ryan
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration