Re: su fails (solved!)

From: ernie.victorerx.com (ernie_at_victorex.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 13:47:54 -0500


"ernie.victorerx.com" wrote:
>
> Vilmos Soti wrote:
> >
> > "ernie.victorerx.com" <ernie@victorex.com> 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.



Relevant Pages

  • Re: fetchmail: lock creation failed - Thanks
    ... Fetchmail works as it should, ... I have learned to use strace, ... home directory tom was owned by root. ... I first attempted to copy the tom directory from the old drive ...
    (Debian-User)
  • Re: 2.6.25.3: su gets stuck for root
    ... I haven't seen it mentioned here (hopefully I wasn't too blind to see): ... If I run "su someuser" as root, ... Can you try to run "strace su someuser" instead? ...
    (Linux-Kernel)
  • Re: Cannot umount any device, Mounting works ok
    ... It's the guessing. ... chmod u+s `which strace` ... Then, as root: ... chmod u-s `which strace` ...
    (comp.os.linux.misc)
  • Re: unable to login; pam broken?
    ... > I have a mysterious problem - I am unable to login as any ... i am also unable to su to root. ... > Apparently my PAM setup is broken (from looking at strace). ... This is just a shot in the dark: try upgrading your 'passwd' ...
    (Debian-User)
  • RE: Query regarding the owner and group of a file.
    ... you may want to run the strace command on the vi ... session when the program is run as 'root' and when run as ... Redirect standard error to a file since strace writes its ...
    (RedHat)