Re: su fails (solved!)
From: ernie.victorerx.com (ernie_at_victorex.com)
Date: Fri, 21 Jan 2005 13:47:54 -0500
> Vilmos Soti wrote:
> > "ernie.victorerx.com" <firstname.lastname@example.org> writes:
> > > I'm using RedHat 9.0 and "suddenly" I can't su to root (but another
> > > session and user is logged in as root). If I do su and provide an
> > > invalid password, it correctly gives me the "su: incorrect password"
> > > message, so I know basic password stuff is OK. But when I provide the
> > > correct password at the "Password: " prompt, I get a ": No such file or
> > > directory" message. I can login with my own user name OK. Any hints as
> > > to what file or program su is looking for and not finding?
> > Try running su under strace. You need to be root, but you stated
> > that you another session as root. Then you might be able to figure
> > out what it is looking for.
> > BTW is it possible that right now you are in a directory which has
> > already been deleted by another process?
> > Vilmos
> Thanks for the hints. strace provided some tantalizing hints, but
> nothing productive. There were two problems there, one is that when you
> run as root, than su to root doesn't behave the same as su to root when
> you aren't already root. And strace won't run if you aren't root even
> if the setuid bit is set (it will under RH 7.2, but won't under 9.0).
> I have source for su and will try some diagnostics in it.
> Thanks again,
> John K
For whomever may be interested, problem was resolved by removing CRs
that text editor added to the end of the line for every system user in
the passwd file.