Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot set root password on new installation [SOLVED]
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
mounty1
l33t
l33t


Joined: 06 Jul 2006
Posts: 934
Location: Queensland

PostPosted: Fri Aug 07, 2009 8:08 am    Post subject: cannot set root password on new installation [SOLVED] Reply with quote

Hello, I'm doing a standard stage3 install onto a spare partition, chrooting in from an existing Gentoo installation. When it comes to setting the root password of the new installation:
Code:
# passwd
Permission denied.
I tried booting the new system with boot option passwd=something but when I tried to log in (as root), it replies Incorrection login without asking for the password. Any ideas ?
_________________
Michael Mounteney


Last edited by mounty1 on Sat Aug 08, 2009 7:31 am; edited 1 time in total
Back to top
View user's profile Send private message
honp
Guru
Guru


Joined: 25 Sep 2006
Posts: 355
Location: Good old Prague, Czech rep.

PostPosted: Fri Aug 07, 2009 8:29 am    Post subject: Reply with quote

If nothing else helps try to replace /etc/passwd and /etc/shadow with some that you know its root password.
Back to top
View user's profile Send private message
mounty1
l33t
l33t


Joined: 06 Jul 2006
Posts: 934
Location: Queensland

PostPosted: Fri Aug 07, 2009 8:36 am    Post subject: Reply with quote

honp wrote:
If nothing else helps try to replace /etc/passwd and /etc/shadow with some that you know its root password.
Tried that.
_________________
Michael Mounteney
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Fri Aug 07, 2009 9:51 am    Post subject: Reply with quote

Quote:
passwd=something

Haven't seen that one before. Got any documentation on that specific kernel arg?
Anyway, try
Code:

init=/bin/bash

or
Code:

init=single

to gain a root shell. Mount your rootfs read-write and run 'passwd'.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Fri Aug 07, 2009 10:34 am    Post subject: Reply with quote

Boot with the livecd, mount the partition where your passwd is located and use your favourite editor to remove the x in the line for root. Reboot and login without a password. Now try setting the password again.

bb
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Aug 07, 2009 2:19 pm    Post subject: Reply with quote

Try this
Code:
# pwconv
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Fri Aug 07, 2009 4:28 pm    Post subject: Reply with quote

boerKrelis wrote:

Haven't seen that one before. Got any documentation on that specific kernel arg?


This is the only thing I've seen that's similar

http://www.sysresccd.org/Sysresccd-manual-en_Network#Running_an_SSH_Server

Quote:

If you want to run an SSH server, you have to change the root password. Just type passwd and give a valid password. You can also use the rootpass=xxx option to define the root password from the boot prompt.
Back to top
View user's profile Send private message
mounty1
l33t
l33t


Joined: 06 Jul 2006
Posts: 934
Location: Queensland

PostPosted: Fri Aug 07, 2009 11:53 pm    Post subject: It's solved Reply with quote

Sorry to waste peoples' time. I just re-started the installation, untarring the stage3 and portage files, and password setting is working. I must have messed something up while merging the /etc hierarchies.
_________________
Michael Mounteney
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Aug 07, 2009 11:55 pm    Post subject: Reply with quote

No problem. The important thing is you got it working. :)
Back to top
View user's profile Send private message
vincent-
Retired Dev
Retired Dev


Joined: 13 Jan 2007
Posts: 415
Location: Valencia (Spain)

PostPosted: Sat Aug 08, 2009 7:25 am    Post subject: Reply with quote

Change the title post and add the [SOLVED] tag.
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