suid not working on AIX ?

Hello,

I'm running AIX 6.1 box.
I tried to use suid on binary file but it doesn't work.
(I set suid on /usr/bin/sleep and tried to run it as user1(sleep owner is bin) - and program still runs as user1. It shoud run as bin isn't it ? - This test run as expected on Linux box)

Filesystem is not mounted with 'nosuid'.

Why suid is not working on AIX ?
Disabled somewhere ?

thanks
Vilius

It may be working, but just not showing up as you expect in the "ps" output.

For instance, if I run "crontab -e", it still appears as my user in "ps aux", even though it is SUID root and SGID cron.

This is probably due to the real UID and effective UID being different things.

Yes, it should run as bin. Have you made sure that the "sleep" you are calling is indeed the "sleep" you expect to be called? Issue "which sleep" (or "whereis sleep", depending on your shell) and make sure you call the binary you expect to call.

If it is still not working (i tried with AIX 5.3 right now and it worked as expected) please post the output of "ls -l /usr/bin/sleep" and the output of "ps -ef | grep sleep | grep -v grep" issued while the sleep process is running.

I hope this helps.

bakunin

Make sure that someone hasn't replaced sleep with a script. AIX does not allow suid on shell scripts.