LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-03-2009, 01: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, 01:44 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
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, 02:39 PM   #3
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
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, 08: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 04:29 AM.
 
Old 06-04-2009, 08:34 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@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



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

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

All times are GMT -5. The time now is 12:35 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
Open Source Consulting | Domain Registration