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

Re: console prompt question



Kara Pritchard said:
> Perhaps the permissions are wrong or something.

That would be my first thought.  Every user needs to be able to read
from /etc/passwd or things like getpwuid() will fail.

If the permissions don't look like this:

    -rw-r--r--    1 root     root         1397 Oct 18 21:30 /etc/passwd

You can do "chown root:root /etc/passwd && chmod 644 /etc/passwd" as
root to fix it.

You also should probably make sure that /etc/passwd isn't munged
somehow.  In the past I have seen boxes where /etc/passwd has one too
few/many fields on a line causing all sorts of havoc.  You can run the
following command to make sure that /etc/passwd looks correct:

    perl -lne '$n=tr/://; print "line $.: $n!=6" if ($n!=6);' /etc/passwd

(That just counts the number of ":" characters in each line, but it
should be close enough to get the job done.  :)

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)398-7320             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.