View previous topic :: View next topic |
Author |
Message |
r0cket- n00b
Joined: 16 Apr 2003 Posts: 62
|
Posted: Sat Apr 19, 2003 6:16 am Post subject: Serial console password problems |
|
|
After finally getting Gentoo built and (almost) installed on my Sparc, I find myself stuck now that I try to login to the system. Simply put, every time I try to login as root with the password I supplied during the install process, the system rejects it with 'Login incorrect.' I'm connecting via a serial console, which is the only access to the system that I have. I've set up /etc/inittab with what I believe is the proper info (I commented out every other agetty, so I can only assume that since I'm seeing anything on the console, I have the proper settings), and also added ttyS0 to my /etc/securetty. Still, no go. I've booted back up from a Debian TFTP net install image, executed a console, and done the following:
#mkdir /mnt/gentoo
#mount /dev/sda4 /mnt/gentoo (/dev/sda4 is my /)
#mount /dev/sda1 /mnt/gentoo/boot (/dev/sda1 is my /boot)
#chroot /mnt/gentoo /mnt/gentoo/bin/bash
#env-update
#source /etc/profile
#passwd password
Verify password:
#exit
And from there I reboot and the system comes back online and eventually I end up at the login prompt and it won't accept the password.
Anyone have any suggestions? |
|
Back to top |
|
|
cerri Bodhisattva
Joined: 05 Mar 2003 Posts: 2957 Location: # init S
|
Posted: Sat Apr 19, 2003 7:54 am Post subject: |
|
|
Have a look at /etc/login.access and /etc/security/logins.conf.
But have you tried to login as a normal user and do su?
What /var/log/everything/current shows? _________________ Enjoy your freedom.
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
<----------------------->
Andrea Cerrito |
|
Back to top |
|
|
r0cket- n00b
Joined: 16 Apr 2003 Posts: 62
|
Posted: Sat Apr 19, 2003 5:03 pm Post subject: Almost got it |
|
|
cerri wrote: | Have a look at /etc/login.access and /etc/security/logins.conf.
But have you tried to login as a normal user and do su?
What /var/log/everything/current shows? |
Well, I think I fixed the problem, though I'm still not sure why it was occuring in the first place.
Basically came down to a problem with PAM and some incorrect settings in my /etc/pam.d/login file. I set up sshd and can ssh into the system just fine as root, so I finally gave up and just copied the /etc/pam.d/sshd over to /etc/pam.d/login, which allowed me to login as root. login wanted previously to check the securetty list, which for some reason fails out, so...
Everything works fine when etc/pam.d/login looks like this:
auth required pam_stack.so service=system-auth
auth required pam_shells.so
#auth required pam_securetty.so
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
But when I uncomment the securetty line, I get 'login incorrect' whenever I try to login from the serial console. /etc/securetty contains ttyS0, which is my serial console, so I'm not really sure what the problem is. I've also tried sticking ttyS1, ttS0, cua0, cua1, etc, just on the chance (it's usually a pretty good one) that I'm just dicking things up somehow.
Now, when I installed Gentoo, I added a -pam to my make.config's USE= line. Could that cause this kind of problem? PAM seems to have gotten installed anyway, and I emerged it again just to be sure...
/var/log/everything/current has just showed '[login] FAILED LOGIN 1 FROM /dev/tts/0 FOR root, Authentication failure' for each attempt at logging in via the serial console when I had the pam_securetty.so module activated. So it looks like the problem is in the securetty check, so I'll probably find a PAM mailing list to question about it next... |
|
Back to top |
|
|
ahbritto n00b
Joined: 02 Feb 2003 Posts: 33
|
Posted: Wed Apr 30, 2003 9:41 am Post subject: This works for me. |
|
|
In /etc/securetty add: tts/0
ttyS0 does not work because it is a symbolic link. |
|
Back to top |
|
|
|
|
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
|
|