Article View: csu.unix.linux
Article #99Re: Lost root password
From: Adam Carheden
Date: Wed, 29 Dec 1999 00:00
Date: Wed, 29 Dec 1999 00:00
53 lines
3046 bytes
3046 bytes
Okay, something seriously weird is going on here. But first, the good news. I reclaimed my root password by running sync as a normal user from an ssh session, holding my breath and hitting the reset button. 'linux single' at the lilo prompt worked. Thanks Eric Dahlman, whoever you are. The bad news is that I can't log in at the console!?! Before I cold-rebooted, I tried loggin in at the console both as root and as a normal user. When I log in with the wrong password, it gives me an error message and outputs another login prompt. When I log in with the right password, it resets the screen and returns to a login prompt, as if I had just run exit. Now, after changing the root password back to what it should be, it does the same thing. Luckily, I can log in from an ssh just fine, both as root and as a normal user. I did two things that could have caused this: 1) installed shadow passwords, 2) messed with /etc/pam.d. First, shadow passwords didn't break my root password, as I logged in as root after installing it (but before the password was mysteriously changed). I only tried this with ssh, however, no from the console. I installed all the new binaries with shadow passwords, so everything should be updated to know about them. I also only played with /etc/pam.d/samba, so that shouldn't have done it. Telnet does the same thing, btw. FTP works fine. Here is my /etc/pam.d/login auth required /lib/security/pam_securetty.so auth required /lib/security/pam_pwdb.so shadow nullok auth required /lib/security/pam_nologin.so account required /lib/security/pam_pwdb.so password required /lib/security/pam_cracklib.so password required /lib/security/pam_pwdb.so shadow nullok\ use_authtok session required /lib/security/pam_pwdb.so So, I'm guessing it's the binary that handles login/telnet that wasn't updated for shadow passwords. Anyone else want to tell me I'm right? And how do I fix it. login came with shadow passwords and was updated when I installed it. Where can I get a version that works, or do I have to look through the source code and recompile it? Adam Carheden wrote: > > Okay, I have no idea how, but my root password no longer works. Can I > simply boot from a floppy and replace the root entry in /etc/shadow with > one from a computer who's root password I do know? > -- > Adam Carheden > carheden@holly.ColoState.EDU
Technical Details
Message-ID:
<386AB040.B3741928@holly.colostate.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3868D051.EA3D47AC@holly.ColoState.EDU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1159f7,89234b293e3ed28b X-Google-Attributes: gid1159f7,public From: Adam Carheden <carheden@holly.colostate.edu> Subject: Re: Lost root password Date: 1999/12/29 Message-ID: <386AB040.B3741928@holly.colostate.edu> X-Deja-AN: 566324241 Content-Transfer-Encoding: 7bit References: <3868D051.EA3D47AC@holly.ColoState.EDU> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 29 Dec 1999 18:07:46 -0700, www.cnhp.colostate.edu MIME-Version: 1.0 Newsgroups: csu.unix.linux