LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721

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
Location: Walsall, England
Distribution: OpenBSD
Posts: 1,918
Blog Entries: 5

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
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, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,144
Blog Entries: 14

Rep: Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080Reputation: 3080
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
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,500

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
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: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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


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



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


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