Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Root Password
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
steppinrazor
n00b
n00b


Joined: 14 Sep 2012
Posts: 1
Location: Olympia, Washington, USA

PostPosted: Fri Sep 14, 2012 9:20 pm    Post subject: Root Password Reply with quote

Hello! I'm new to the forums and somewhat new to Gentoo in that I've tried to install it several times and given up each one. However, I have found the other Linux distros to be quite frustrating and I see the frustration of installing Gentoo as a challenge with a decent reward at the end. So it is I am back at it trying to install Gentoo, but alas I have fallen victim to my own mistake.

I got the farthest I have ever gotten in the handbook installation guide. I got to the rebooting part of installation, and upon reboot the system asked for my login. Thinking I could just bypass it I hit Enter. It asked me for a password and I hit Enter again. Invalid Login. I tried the login root and hit Enter for the password. Invalid Login. I tried root and my usual password. Invalid Login.

It seems I skipped the step to set a root password, but looking back in the handbook it says that this step is optional.

So here's my question:
Is there anyway out of my conundrum or do I have to start the reinstall all over again?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32452
Location: 56N 3W

PostPosted: Fri Sep 14, 2012 10:08 pm    Post subject: Reply with quote

steppinrazor,

Welcome to Gentoo.

If the handbook really says that setting a root password in your new install is optional, please file a bug at bugs.gentoo.org

There are two stages in the handbook where setting a root password is mentioned.
First, before the
Code:
chroot /mnt/gentoo /bin/bash
step. This is optional. It sets the root passord for you liveCD session, so you know it in case you want to log in over ssh.

The non optional time is after the chroot, to set the root password for your own install. Which as you have discovered, is essential.
There are several 'dirty hacks' to fix it and the right way. None of them involve reinstalling anything.

You need to get back into your chroot.
Mount your filesystems, just as you did when you installed. Do not run fdisk, do not make any new filesystems.
Don't forget the special filesystems /proc and /dev
Do the chroot step and the env-update and source /etc/profile all as per the handbook.

You are now back in your chroot as if you had never left, as the root user.
Issue the
Code:
passwd
command, to set your root users password.

Reboot to enjoy your Gentoo
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4805
Location: Saint Amant, Acadiana

PostPosted: Fri Sep 14, 2012 11:21 pm    Post subject: Reply with quote

As always, there is more than one way to skin the cat. You can add init=/bin/bash to your kernel command line when booting and you will find yourself logged on as root with no password asked.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32452
Location: 56N 3W

PostPosted: Fri Sep 14, 2012 11:26 pm    Post subject: Reply with quote

Jaglover,

Thats one of the hackish ways I was hiniting at ... but its just you, bash and the kernel on a read only filesystem.
Chroot is more generally applicable to fixing stuff
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4805
Location: Saint Amant, Acadiana

PostPosted: Fri Sep 14, 2012 11:33 pm    Post subject: Reply with quote

NeddySeagoon,

I do not disagree, chroot is better for fixing various issues, just remounting rw seems still less work for setting root password.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32452
Location: 56N 3W

PostPosted: Fri Sep 14, 2012 11:43 pm    Post subject: Reply with quote

Jaglover,

It probably is but I like to teach good habits. Everyone dicovers the shortcuts later.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum