[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UIDs missing, "I have no name!", etc



Kent:

Check file permissions on /etc/passwd.  It should be world-readable.

$ ls -l /etc/passwd
-rw-r--r--   1 root     root         1363 Apr 28 15:44 /etc/passwd

"chmod 644 /etc/passwd" (as root) to set permissions like above.

Marc

----------
Marc Mongeon <mongeon@bankoe.com>
Unix Specialist
Ban-Koe Systems
9100 W Bloomington Fwy
Bloomington, MN 55431-2200
(612)888-0123, x417 | FAX: (612)888-3344
----------
"It's such a fine line between clever and stupid."
   -- David St. Hubbins and Nigel Tufnel of "Spinal Tap"


>>> Kent West <westk@nicanor.acu.edu> 06/19 11:32 PM >>>
Greetings all!

(Short story version in last paragraph below)

I forgot the root password on my mom's Debian box (she doesn't use it;
just Win3.x on the other side of the dual-boot). In trying to recover from
that (and not knowing what I was doing), I got the machine frozen and
couldn't recover control, (okay, I took a break from thinking and tried to
run a game that had graphic problems), so finally had to do a hard reset.

After reboot, (and e2fsck runs) I couldn't log in as anyone. Restarting in
single mode, I was able to log in as root (without remembering the
password? how? - I don't remember how I got to that point).

Looking at the /etc/passwd file, the first 15 or so lines were garbled
with what looked like the output of the mount command.

I found a file named /etc/passwd-  that looked like a functional copy of
the original, so I copied it to /etc/passwd and rebooted into normal mode.
Again, I couldn't log in, so I repeated the process and again found the
/etc/passwd file to be corrupt.

By tinkering I was able to get shadow passwords turned off and then get
the /etc/passwd file to stay uncorrupted and then turn shadow passwords
back on and reset passwords for the 4 or 5 users on this box (including
root), and everything seems to be doing pretty well.

The only problem is that if I'm logged in as anyone except root and set my
prompt to display my username, it displays instead "I have no name!" If I
do a whoami command, it returns "cannot find username for UID 1000" (or
whatever the UID is supposed to be.

Anyone know the fix for this?

Thanks!


-- 
Kent West
kent.west@infotech.acu.edu 
KC5ENO - Amateur Radio: When all else fails.
Linux - Finally! A real OS for the Intel PC!
"Life is an ongoing classroom." - Capt. James T. Kirk, "Dreadnought"


-- 
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null



Reply to: