LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-03-2009, 02:41 PM   #1
johnnyxxxcakes
Member
 
Registered: Nov 2008
Location: /home/john
Distribution: Fedora 11 Xfce
Posts: 40

Rep: Reputation: 15
Using "su" failes


I keep getting an authentication failure when I enter:

Quote:
john@john-laptop:~$ su
Password:
su: Authentication failure
john@john-laptop:~$
I entered the password for myself (the user john), but that gives me the authentication failure. I don't ever remember setting a root password so I wouldn't know what to enter here. Is there a way to set a new one?
 
Old 06-03-2009, 02:44 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Quote:
Originally Posted by johnnyxxxcakes View Post
I keep getting an authentication failure when I enter:
I entered the password for myself (the user john), but that gives me the authentication failure. I don't ever remember setting a root password so I wouldn't know what to enter here. Is there a way to set a new one?
No, when using su, you should give the root password. Otherwise, use sudo if it's configured.

To set a new root passwd, boot in single user mode and type
passwd

Single user mode is accessible at boot, how exactly you do this depends on your bootloader (grub or lilo). Generally, you get to the boot prompt and type
linux single

or
linux 1
 
Old 06-03-2009, 03:39 PM   #3
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,036

Rep: Reputation: 96
With some disributions you don't create a root password during the installation (for example Ubuntu) and therefore the root account is disabled for logins until a password is set.

In these instances, you normally have sudo configured for the initial user out of the box.

If this is the case, you could run (as the initial user):
Code:
sudo passwd
Enter your password to enable sudo, then when prompted enter what you want the root password to be.
 
Old 06-04-2009, 09:30 AM   #4
soleilarw
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 19
What is the practical purpose to use 'su' to gain access to the very same account that you are already using (user 'john' trying to su to user 'john')?

Linux Archive

Last edited by soleilarw; 06-18-2009 at 05:29 AM.
 
Old 06-04-2009, 09:34 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
@soleilarw: That is not the case.

su -> become root but keep the environment settings of the user that is su-ing.
su - -> become root and use root's environment.

There's a difference, but in the end both will switch to user root.
 
  


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
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
Dbeian etch "apt-get install alien" failes , bug? android6011 Debian 5 08-04-2006 03:38 PM


All times are GMT -5. The time now is 08:43 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