Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
root password not accepted at boot on new system [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Gustav IV
n00b
n00b


Joined: 10 Jan 2007
Posts: 69
Location: Copenhagen

PostPosted: Thu May 24, 2007 12:39 pm    Post subject: root password not accepted at boot on new system [SOLVED] Reply with quote

Hi everyone!

After the lastest release of Gentoo 2007.0 I decided to install that on my system and see if that works better than 2006.1. Apparently packages could be installed on the new 2007 where I had to build everything from source with 2006. (The desktop took more than a day to compile and was only a bare boned skeleton when I launched Gentoo. A dreadful waste of time).

The new system was installed, not without a bunch of annoyingly perpetual problems, such as a failure to use "find" to locate modules, but, all in all, I managed to get a kernel configured and installed. However, on the initial boot of the fresh system I could not log in as root with the root passward :( . I could log in as a user and my password was accepted here, but that's no good to complete the installation of the rest of Gentoo.

I have a perfectly well running Debian Etch on my system, so I could mount and chroot onto the Gentoo partitions and create a new password with the passwd tool. This was again refused at the Gentoo prompt after a reboot.

So, chroot was again used to now access the /etc/shadow and /etc/shadow- files. I must admit I was a little surprised to see the etc/shadow- file, so I kept a back up of that.

After deleting the root password from /etc/shadow and /etc/shadow- I gave root a new password, checked the shadow file, and it was updated with a new encrypted code, and of course after again an unsuccessful attempt to become root, I am now writing to you.

Why will the new Gentoo not accept a true password at boot? :?

Looking forward to hearing from you.

Gustav
_________________
"Hey, hey, hey — don't be mean. No need to be mean. 'Cause, remember: no matter where you go... there you are." - Buckaroo Banzai


Last edited by Gustav IV on Sat May 26, 2007 8:50 am; edited 1 time in total
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Thu May 24, 2007 2:10 pm    Post subject: Reply with quote

Quote:
After the lastest release of Gentoo 2007.0 I decided to install that on my system and see if that works better than 2006.1.


why ? updating the profile link is enough, no need to re-install everything again !

Quote:
Why will the new Gentoo not accept a true password at boot?


did you triplecheck ? No need to touch any conf files btw, passwd should do the trick.

cheers
_________________
Error: Failing not supported by current locale
Back to top
View user's profile Send private message
Gustav IV
n00b
n00b


Joined: 10 Jan 2007
Posts: 69
Location: Copenhagen

PostPosted: Thu May 24, 2007 5:29 pm    Post subject: Reply with quote

Hi Gringo,

I erased the partititon with the 2006.1 Gentoo on it to reconfigure the partition sizes. Like I said, I could never get Gentoo running properly anyway, so I decided to start with the new fresh version, and a fresh installation.

I thought passwd would have cured all these problems but it doesn't. From the live cd, I chrooted onto the root partition and invoked passwd several times to the point of just giving up. Nothing helped. That's why I finally had to edit the configuration file.

By the way, I am really enjoying trying to solve these mysteries. I can't do this all the time, but the challenge has help me learn quite a bit about Linux, and the experiences have proven themselves to be invaluble when working with Debian.

Sinerely,
Gustav
_________________
"Hey, hey, hey — don't be mean. No need to be mean. 'Cause, remember: no matter where you go... there you are." - Buckaroo Banzai
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2674
Location: here, there or in transit

PostPosted: Thu May 24, 2007 5:49 pm    Post subject: Reply with quote

Are you able to become root via su (assuming you made your initial user a member of the wheel group) or is that denied as well?

Does the file /etc/securetty exist? It should list consoles on which root is allowed to log in, one per line. If it was accidentally overwritten root wouldn't be able to log in on any console--only su would be allowed.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Gustav IV
n00b
n00b


Joined: 10 Jan 2007
Posts: 69
Location: Copenhagen

PostPosted: Fri May 25, 2007 11:20 am    Post subject: Reply with quote

Those are some good points your bring up TimeBandit.
Quote:
Are you able to become root via su (assuming you made your initial user a member of the wheel group) or is that denied as well?


I just followed the instruktions of the installation manual, it made no mention of the need to add root to wheel group. (I was assuming that it did it automatically) At the login prompt I tried to log in as root and su, as well as su -.

Quote:
Does the file /etc/securetty exist? It should list consoles on which root is allowed to log in, one per line. If it was accidentally overwritten root wouldn't be able to log in on any console--only su would be allowed.


There exists an /etc/securetty file, but there's nothing in it now. The installation instruktions made mention for the need to edit this if using a serial console:
Quote:
If you want root to be able to log on through the serial console, add tts/0 to /etc/securetty:

Code Listing 16: Adding tts/0 to /etc/securetty
Code:

# echo "tts/0" >> /etc/securetty
 


After not being able to log in as root, I suspected that this could have caused these problems so I commented it out. (I didn't think I needed it anyway.)

But could it have been overwritten by the mentioned command codes? I think that this is the real source of the problem, and why no matter which password I used failed. I'll have to check this.

Thanks for your help and advice!
_________________
"Hey, hey, hey — don't be mean. No need to be mean. 'Cause, remember: no matter where you go... there you are." - Buckaroo Banzai
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2674
Location: here, there or in transit

PostPosted: Sat May 26, 2007 1:49 am    Post subject: Reply with quote

Gustav IV wrote:
There exists an /etc/securetty file, but there's nothing in it now.
I think we've found your problem. :)

If /etc/securetty is empty, the login program will deny root access from any console or X terminal. Ordinary (non-root) users can log in, and if authorized can then "become root" by another means: the su program. Note su is a program, not a user name--that's why you can't log in as user "su." A user who is a member of the wheel group is authorized to use su. Root needn't be authorized, root can do anything (once logged in of course :lol:).

During installation, you should have created an ordinary, non-root user for day-to-day use of the system. Quoting the example in the handbook, the commands to do so should have looked something like this:
The Gentoo Handbook said:
~ # adduser -g users -G lp,wheel,audio,cdrom,portage,cron -m gustav
~ # passwd gustav
New UNIX password: <gustav's password>
Retype new UNIX password: <gustav's password again>
passwd: password updated successfully

You need to login as that user, using the password you set for that user. Then, give this command to become root:
Code:
~ $ su -
Password:
...and give the root password this time. You are now the superuser and can edit /etc/securetty (your regular user has no permissions on that file).

Give the following commands to erase /etc/securetty and start over:
Code:
cp /dev/null /etc/securetty
nano -w /etc/securetty

Then, paste the following into the editor (nano). This is a default setup that allows root to login from any console, which is usually what you want until you become more experienced and/or paranoid. :wink:
/etc/securetty:
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
vc/0
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
vc/12
tty0
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12

Save the file by pressing Ctrl+O, then Enter, then Ctrl+X. Then give the command exit twice--to exit the root (su) shell and log out your regular user. At the login prompt you should now be able to log in as root.

If you have no ordinary user account or it cannot log in either, boot your LiveCD, mount your Gentoo root partition at /mnt/gentoo as instructed in the installation guide, and follow the instructions above using the path /mnt/gentoo/etc/securetty instead of /etc/securetty. Then reboot to your Gentoo installation, log in as root and create an ordinary user (as you were supposed to do the first time around :wink:).
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Gustav IV
n00b
n00b


Joined: 10 Jan 2007
Posts: 69
Location: Copenhagen

PostPosted: Sat May 26, 2007 8:50 am    Post subject: Reply with quote

Thanks for your help TimeBandit!
I copied an /etc/secretty file from Debian and rebooted: Logged in as root no problems!

This was the first problem I have ever encountered with a root log in. But what disturbs me a bit is that after running the echo command:
# echo "tts/0" >> /etc/securetty

I checked the file and there was only tts/0 in it??? What happened to the rest of it? (a retorical question).

But now I can continue with the installation.

This problem is now solved.
_________________
"Hey, hey, hey — don't be mean. No need to be mean. 'Cause, remember: no matter where you go... there you are." - Buckaroo Banzai
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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