puzzling 'must be setuid root' error

tim.morse at tsc.tdk.com tim.morse at tsc.tdk.com
Wed Oct 15 15:12:24 EDT 2003


Hi sudo guys,

I have a problem running sudo that I'm at a loss to explain.  I've checked
the newsgroups
and the archives for this list but I can't find the answer anywhere and
it's driving me crazy.

In a nutshell, I built sudo on a SunOS 5.8 machine in my home directory and
I'm getting the
error 'must be setuid root' and I can't figure out why.  The program is
suid root

   -rwsr-x--x   1 root       323083 Oct 14 09:21
/user/tmorset/sudo-1.6.7p5/sudo

and my home directory is NFS mounted with suid allowed (unless I'm missing
something here .....)

    tusserv1:~/sudo-1.6.7p5> df .
    Filesystem            kbytes    used   avail capacity  Mounted on
    tusnfs1:/local/user  142993384 131272616 11720768    92%    /a/tusnfs1/local/user

    tusserv1:~/sudo-1.6.7p5> /sbin/mount | grep tusnfs1
    /a/tusnfs1/local/vendor on tusnfs1:/local/vendor remote/read/write/setuid/dev=44c0056 on Tue Jul 29 14:10:22 2003
    /a/tusnfs1/local/user on tusnfs1:/local/user remote/read/write/setuid/dev=44c0073 on Mon Aug  4 09:47:00 2003

I've also made sure '~/sudo-1.6.7p5' is at the front of my searchpath and
'.' is at the end.

I ran the code through gdb and the error is caused by the geteuid() call
returning my uid 18224
instead of root's uid.  I don't know much about NFS but I assume the setuid
permission on the mount
should cause geteuid() to return 0 or possibly 'nobody' if it wasn't
working.  The executable is owned
by root.  But my uid?  If I move the executable to a local disk it runs
fine, so NFS is doing something
here, I just don't know what.

Any ideas or pointers in the right direction would be appreciated, thanks.


Tim Morse














More information about the sudo-users mailing list