LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 03-27-2009, 12:44 PM   #1
Jamesq106
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Rep: Reputation: 0
Linux Fedora *root password*


Im after setting up fedora 10 desktop here and anytime I try to make any changes to the system it keeps asking me for a root password. I never assigned anytime of password to the system except to log in for.

The message comes up system-config-rootpassword
asking for admin privleges

Wouldnt I be the admin seeing how I set it up or do I need to make myself admin, sorry new to this here and I you could dumb it down for me that would be great. cheers
 
Old 03-27-2009, 01:16 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by Jamesq106 View Post
Im after setting up fedora 10 desktop here and anytime I try to make any changes to the system it keeps asking me for a root password. I never assigned anytime of password to the system except to log in for.

The message comes up system-config-rootpassword
asking for admin privleges

Wouldnt I be the admin seeing how I set it up or do I need to make myself admin, sorry new to this here and I you could dumb it down for me that would be great. cheers
Try this...

Code:
you@fedora$ sudo -s
Password:
Enter your password...if it comes back successfully then you can change the root password like this...

Code:
root@fedora# passwd root
Even better would be
Code:
you@fedora$ sudo system-config-rootpassword
But if you can't you need to boot into single user mode to change the password....

-C

Last edited by custangro; 03-27-2009 at 01:17 PM.
 
Old 03-27-2009, 01:23 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Trust me, you set a root password---it just may not have been obvious what was happening.

At the end of the post above, he mentions booting in single-user mode. To do that:
reboot
when the grub menu appears, hit any key to stop the count
hit e for edit
select the kernel line and e again
add the word "single" (no quotes), and hit return
hit b to boot

You will come up in a terminal mode--as root--with no password needed. enter "passwd", and then enter a new root password.

Finally, enter "init 5" to get back to normal login.
 
Old 03-27-2009, 02:25 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
And just a "heads up:" On Fedora, no users are in the /etc/sudoers file by default, so the sudo commnad suggested above will not work for you. And the "single" boot option mentioned above may need to be the number "1"

Note that another way to (re)set the root password is to boot from your installation media and select the "Rescue an installed system" option. After you enter the chroot command suggested at the end of the boot (after a lot of output) you will be logged in as "root" and can use the command lpasswd -P <password> root (where <passwoed> is the new password string you want to use) to change the password. (The passwrd command requires that you know the root password in order to change it, whilst lpasswd will, I think, just make the change if you're logged in as "root.")

See man passwrd and man lpasswd for details.
 
Old 03-27-2009, 02:29 PM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by PTrenholme View Post
And just a "heads up:" On Fedora, no users are in the /etc/sudoers file by default, so the sudo commnad suggested above will not work for you. And the "single" boot option mentioned above may need to be the number "1"

Note that another way to (re)set the root password is to boot from your installation media and select the "Rescue an installed system" option. After you enter the chroot command suggested at the end of the boot (after a lot of output) you will be logged in as "root" and can use the command lpasswd -P <password> root (where <passwoed> is the new password string you want to use) to change the password. (The passwrd command requires that you know the root password in order to change it, whilst lpasswd will, I think, just make the change if you're logged in as "root.")

See man passwrd and man lpasswd for details.
Yes, my method assumes that you've set up sudo.

Going into single user mode seems like the best option.
 
Old 10-01-2012, 06:33 PM   #6
gilly2
LQ Newbie
 
Registered: Oct 2012
Posts: 17

Rep: Reputation: Disabled
Did it Work?

Hey Jamesq106, did the suggestions work for you? I also have the same problem. I'm not aware I set up a root password when I installed Fedora. Now I need one to install software. I'd be interested in how you went. Regards.
 
Old 10-01-2012, 10:01 PM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 13,508

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
you DO NOT have " the same problem" as was with fedora 10

the root gui login in fedora 17 HAS BEEN DISABLED ( disabled back in fedora 11 )
by BOTH the fedora development team AND by the Gnome desktop development team



if you need to be root to build software or install using the yum gui
type in the root password you set up on the third screen during install
Into the pop up window or in the terminal

fedora BY DEFAULT dose NOT use "sudo"
to use that YOU have to manually set that up

Fedora uses" su" and " su -"
that is su then a dash

Code:
su -
---- type in your root password when asked --
yum update
 
Old 10-02-2012, 12:57 AM   #8
gilly2
LQ Newbie
 
Registered: Oct 2012
Posts: 17

Rep: Reputation: Disabled
Thanks John VV. I have not manually set up sudo and unfortunately I do not recall establishing a root password when I installed Fedora. Under Newbie in this forum it has been suggested that I try the commands "sudo passwd root" or "sudo bash" to prompt me to set the su password.
Are you suggesting that the reference to sudo will not be valid? Might you know of another way that I may get to the 'root' of things without a password?
Thanks
 
Old 10-02-2012, 02:11 AM   #9
John VV
Guru
 
Registered: Aug 2005
Posts: 13,508

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
in order to set up the sudoers file you HAVE to have the root password you DID set up

during the install you were Asked to set the root password
THEN AFTER the install on the FIRST boot you then made a normal user account .


you can NOT use sudo on fedora without editing the sudoers file and you NEED to be root to do that

see the mjmwired page for fedora 17 sudo
http://www.mjmwired.net/resources/mj...-f17.html#sudo
 
Old 10-02-2012, 12:57 PM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
If you've forgotten you "root" password, you can reset it by booting from a LiveCD (any Fedora LiveCD or installation disk should work), picking the "rescue" mode, doing the suggested chroot command (usually, chroot /boot/sysimage), and entering the passwd command.

Note that you could also edit the sudoers file whilst in that mode. On my system, I have this line:

%wheel ALL=(ALL) NOPASSWD: ALL

in my sudoers file, and I've put myself in the wheel group.

Note: It's not a good idea to put that big a hole in you security if there is any outside access you your system and you have anything in your computer to which you wouldn't want the whole world to have access.
 
Old 10-02-2012, 05:38 PM   #11
gilly2
LQ Newbie
 
Registered: Oct 2012
Posts: 17

Rep: Reputation: Disabled
Thanks for your assistance. I see I have two avenues to pursue: 1. Boot in single user mode, or 2. Boot from a Live CD or installation disc in rescue mode.

Regarding option 2: I initially downloaded Fedora from the Parallels Desktop Wizard so I don't have any installation media. This may be why I missed observing my root password in the first place. I could download the media again outside the Parallels Desktop Wizard and just start again. I don't know how easily that would integrate into my Parallels Desktop 7 software.

I have investigated option 1. Back in 2005 in this thread, Pixellany described the process of rebooting in single user mode. The suggestion was to locate the kernal line in the grub menu and add the word "single" (subsequently suggested by PTrenholm that this might need to be the number "1"). The trouble here is that I don't know which is the kernal line. The grub version I am looking at is GNU GRUB version 2.00~beta4.

If anyone is able to steer me towards the kernal line in grub and assist in me booting in single user mode that would be much appreciated. Once there the idea would be to use "passwd" to enter a new root password.
 
Old 10-02-2012, 06:19 PM   #12
gilly2
LQ Newbie
 
Registered: Oct 2012
Posts: 17

Rep: Reputation: Disabled
This updates my last post made 30 min ago. Somewhat out of frustration I tried entering 'sudo passwd root' and was able to get to the root and enter a new pass word. To John VV: I had not set up sudo manually but there you go - it still worked. Thank you all for your advice. Regards.
 
  


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
Root Password on Fedora 10 Atwin Linux - Laptop and Netbook 7 01-12-2009 06:29 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 03:02 AM
how we can recover root password in fedora linux kamalkirat1 Linux - Software 3 11-21-2008 09:54 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 05:11 AM


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