cannot su?

Robert Watson rwatson at freebsd.org
Mon Jan 17 11:59:51 PST 2005


On Mon, 17 Jan 2005, Ivan Voras wrote:

> >>I have a user that's in wheel group. Logging in as root works on the
> >>console, but su-ing from the user just writes 'Sorry', like the
> >>password's wrong. There are no clues in log files.
> > 
> > Make sure /usr/sbin/su is suid root (and /usr isn't mounted nosuid).
> 
> It's stupid of me not to have checked that, but this is a very good
> candidate for more information/verbosity - failure mode was just like
> password/credentials were invalid. 

I've modified the su(1) source in HEAD to print a message if su(1) is
executed without an effective uid of 0 (i.e., as root, or setuid as
another user).  Hopefully this error message will be more suggestive than
"sorry": 

  paprika:~/freebsd/commit/src/usr.bin/su> ./su
  su: not running setuid

Assuming I didn't shoot any feet, I'll MFC this to RELENG_5 in a couple of
weeks.

Robert N M Watson




More information about the freebsd-stable mailing list