[NBLUG/talk] Lost Passwords
Ian Sutherland
iansuth at fastmail.fm
Fri Mar 25 09:29:33 PST 2005
Thanks, I was using shadowed passwords. There is an "x" in the second
field.
Somehow I removed the shadow file and the gshadow file.
Your earlier instructions would have worked with /etc/passwd and I got
distracted because /etc/shadow was missing.
System is up and running. I used useradd to add user "ians" and the
password is not encrypted.
I do not know how to do that yet.
Here is the info. you asked for;
debian:/home/ians# ls -l /home | grep ian
drwxrwxr-x 34 6058 dip 4096 2003-09-22 21:57 ian
drwxr-xr-x 2 ians users 4096 2005-03-25 08:04 ians
drwxr-sr-x 2 root staff 4096 2005-03-23 13:09 iansuth
debian:/home/ians# grep ian /etc/passwd
Debian-exim:x:102:102::/var/spool/exim4:/bin/false
ians:$1$EaY2zb3i$YaqMU7LaSh1L.fNpeu8V//:1000:100::/home/ians:
debian:/home/ians# grep ian /etc/group
Debian-exim:x:102:
You guys are my heroes.
Thanks, Ian
On Fri, 25 Mar 2005 00:36:56 -0800, "Andrew" <argonaut at softhome.net>
said:
> Ian Sutherland wrote on Wed, 23 Mar 2005 08:31:36 -0800:
>
> > Thanks for the response. There is no "shadow" file in
> > /mnt/hdd3/etc.
>
> So you're not using shadowed passwords? When you look in
> /etc/passwd, do some of the entries actually have something other
> than "x" in the second field? That's not very secure since
> anyone, even non-privileged users, can see the encrypted
> passwords and run a password cracker against them. I can't think
> of any good reason not to use shadowed passwords these days.
>
> But that's something to be fixed later. Right now, let's just get
> your system up and running again (if you haven't done it
> yourself, yet). Use either Augie's instructions to start Debian
> in single-user mode or my instructions to go in through Knoppix
> and make your /etc/passwd (not shadow) file writeable. Then
> delete root's encrypted password as I described earlier. The root
> entry should now look like this:
>
> root::0:0:root:/root:/bin/bash
>
> Save it. Reboot Debian the normal way. You should now be able to
> log in as root without a password. Set a new password for root.
> After you've done this, you can make other changes, if necessary.
>
>
> > I checked the permissions for /home/ian;
> >
> > User 6058
> > Group dip
> >
> > /home/ian1;
> >
> > User 1001
> > Group sslwrap
>
> Well, ian1, at least, looks OK. Here you are seeing Knoppix's
> interpretation of the ownership of those two directories. I would
> expect the ian1 directory to have a numeric User ID and Group ID
> of 1001 if that user was the second non-privileged user that you
> created on your Debian system. If you look in Knoppix's (not
> Debian's) /etc/passwd and /etc/group you will see there is no
> entry for UID 1001 in /etc/passwd but there *is* an entry for GID
> 1001 in /etc/group, and that it's mapped to the group name
> "sslwrap". Hence the output you see above for ian1.
>
> The ian directory, however, seems strange to me. Assuming ian was
> the first regular user that you created on your Debian system,
> that user should have a numeric UID and GID of 1000 and the
> ownership of /home/ian should reflect that. Instead, the
> directory is owned by UID 6058 and GID 30. (If you look in
> Knoppix's /etc/group, you'll see that GID 30 corresponds to
> "dip".) This is definitely unusual. After you do the above
> procedure and get yourself logged in to your Debian system as
> root, send us the sanitized (no passwords!) output from these
> three commands:
>
> ls -l /home | grep ian
> grep ian /etc/passwd
> grep ian /etc/group
>
> and we'll fix the ownership of your home directories.
>
> A.
>
>
> > On Wed, 23 Mar 2005 01:10:19 -0800, "Andrew"
> > <argonaut at softhome.net> said:
> > > Ian Sutherland wrote on Tue, 22 Mar 2005 22:30:14 -0800:
> > >
> > > > Whatever I did, none of the passwords, root, users, work at
> > > > login of Debian sarge.
> > > [snip]
> > > > I tried accessing /etc/passwd from Knoppix to install a new
> > > > user but it's read only.
> > > [snip]
> > >
> > > Remember, Knoppix bends over backwards to make sure you don't
> > > accidentally screw up the data on your hard disk. This
> > > includes mounting hard disk partitions read-only unless you
> > > specifically choose to mount them read-write.
> [snip a bunch of instructions]
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
--
Ian Sutherland
2 Varda Street
Rohnert Park, CA 94928
iansuth at fastmail.fm
More information about the talk
mailing list