LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-21-2011, 03:06 PM   #16
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723

Quote:
Originally Posted by Cultist View Post
um, isn't it short for superuser?
No, since you can use it to switch to any user account.
 
Old 10-21-2011, 03:30 PM   #17
thezerodragon
Member
 
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142

Rep: Reputation: 44
Quote:
um, isn't it short for superuser?
No, as we were discussing, this command substitutes the user. As acid_kewpie explained, the verbose form would be
Code:
su --login
When left blank, the shell assumes you mean root or superuser. But you could just as well type in, say
Code:
su --login billy
and log in as username billy if such a user existed. Thus su can't be assumed to stand for SuperUser.
 
Old 10-21-2011, 03:55 PM   #18
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Quote:
Originally Posted by Cultist View Post
um, isn't it short for superuser?
It's short for "substitute user" (no arguments to become a superuser).

Man pages tend to differ.
 
Old 10-21-2011, 09:07 PM   #19
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Quote:
Originally Posted by Cultist View Post
um, isn't it short for superuser?
No, though I thought so for a long time myself.

If you don't specify a user name, su assumes root, but if you enter "su joeblow" and follow it with joeblow's password, you will be su-ed as joeblow.
 
Old 10-21-2011, 09:22 PM   #20
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by frankbell View Post
If you don't specify a user name, su assumes root, but if you enter "su joeblow" and follow it with joeblow's password, you will be su-ed as joeblow.
It is even better. When you first su to become root and then su joeblow you don't need joeblow's password. Very handy when you want to research permission problems (or whatever in fact). You can become a user and act like him without having to ask his password.

sudo su joeblow does the same trick.

jlinkels
 
Old 10-21-2011, 11:28 PM   #21
thezerodragon
Member
 
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142

Rep: Reputation: 44
Quote:
It is even better.
cool, this info was really useful.
 
Old 10-22-2011, 04:25 AM   #22
shanky
Member
 
Registered: Aug 2011
Posts: 155

Original Poster
Rep: Reputation: Disabled
Thanks..i got to know a lot ..but was confusing in the beginning..thanks again !!
 
Old 10-22-2011, 04:45 AM   #23
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by jlinkels View Post
It is even better. When you first su to become root and then su joeblow you don't need joeblow's password. Very handy when you want to research permission problems (or whatever in fact). You can become a user and act like him without having to ask his password.

sudo su joeblow does the same trick.

jlinkels
I wouldn't count this as specifically interesting, just logical given the status of the root account. running su inside of sudo should be punishable by death IMHO though. "sudo -i -u joeblow" would be a much better way to do it for various reasons. Given a correct sudoers setup that is.
 
  


Reply



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
sudo cd /root gives 'sudo: cd: command not found'. stf92 Linux - Newbie 4 03-03-2012 09:05 AM
[SOLVED] sudo:must be setuid root rahulkya Linux - Software 7 02-21-2011 03:25 PM
Sudo Password for Root, not Going? Novatian Fedora 12 11-10-2010 02:16 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
Sudo, su and root lesleyb Linux - Security 3 10-18-2004 01:36 PM

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

All times are GMT -5. The time now is 09:18 AM.

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
Open Source Consulting | Domain Registration