suid not working on AIX ?

Thread Tools Search this Thread
Operating Systems AIX suid not working on AIX ?
# 1  
Old 12-01-2009
suid not working on AIX ?


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 ?

# 2  
Old 12-02-2009
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.
# 3  
Old 12-02-2009
Originally Posted by vilius
(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 ?
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.

# 4  
Old 12-02-2009
Make sure that someone hasn't replaced sleep with a script. AIX does not allow suid on shell scripts.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

AIX 4.3 - Need help - Printers not working

I am running an old IBM P-Series server running AIX 4.3 (I know a dinosaur). The OS has not been updated. We had a hard drive failure last weekend, and I was able to get most of the system back up, however, I have 3 line printers and 3 label printers that I can not get working. I have tried... (2 Replies)
Discussion started by: Patrick.Crocker
2 Replies

2. Shell Programming and Scripting

AIX- .netrc NOT working in Linux

Hi, I got an issue in .netrc , please find below SFTP script and .netrc file . getting error as below, please assist me to rectify, thanks. sftp> $ imuploaddata test1.DAT /home/test/ Invalid command. FTP scripts abc@systalk:~/test> cat #!/bin/sh filetoftp="$1" filepath="$2"... (4 Replies)
Discussion started by: Riverstone
4 Replies

3. Shell Programming and Scripting

Find command not working on AIX

Hello, I am running find command in an AIX Server to find last 7 days modified directories/files. >cd /usr/openv/netbackup/db/class >ls -l total 0 drwxr-xr-x 3 root system 256 May 28 2014 Catalog-Backup drwxr-xr-x 3 root system 256 Sep 18 2012 ... (4 Replies)
Discussion started by: rahul2662
4 Replies

4. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

5. AIX

rssh not working in AIX 6.1

edit by bakunin: double post SNIPped. Hi, I have a similar problem with my AIX 6.1. In AIX 5.3, I have successfully implemented rssh for the caging of my SFTP users. Since we just upgraded to AIX 6.1 TL6 SP7, the rssh does not work. The SFTP works when the user's shell is set to ksh, but... (1 Reply)
Discussion started by: eddie.lee
1 Replies

6. UNIX for Advanced & Expert Users

rm -rf not working on AIX 6.1

Hi Guys, I have never seen this happen before, but created a directory as a user when installing some software, software install fails so I try and remove the directory as root and get an error. There is no processes using the folder see output: ls -l total 446336 -rwxr----- 1 u0008862... (2 Replies)
Discussion started by: chris5126
2 Replies

7. Shell Programming and Scripting

*/5 not working in AIX

Hi Guys, I tried to schedule a script for every 5 mins. i tried */5 but it is not working. Is writing every 5 mins is the only way to do it? like below 05,10,15,20,25,30,35,40,45,50,55 05-08 Thanks And Regards, Magesh (11 Replies)
Discussion started by: mac4rfree
11 Replies

8. AIX

^P Not working on AIX.

I'm working on an AIX box, and I generall prefer emacs command line editing in ksh. Most control-commands are working, except not control-P (Recall previous command). ksh set - o emacs ^p Does not result in the expected outcome. does anyone know why this might be? (0 Replies)
Discussion started by: akbar
0 Replies

9. UNIX for Advanced & Expert Users

SUID not working

Hi Senario: I have previleges to edit a file F but User B does not have sufficient privs to edit it. In order for B to edit it I tried an indirect way. I created a script to edit F and SUID this script so that B can execute it with the privs of me. But this is not working . can some one help... (3 Replies)
Discussion started by: Pankaj Mishra
3 Replies

10. Programming

Code working AIX 5.2 and not in Solaris 5.9

Hi, When i run the below code in AIX it runs and solaris not ... why ??? #include <stdio.h> #include <string.h> #define MAX 1 int main () { char str ="1,2,3,4,5"; char * pch,b; int a; printf ("Enter the int to be searched ",str); scanf("%d",&a); sprintf(b,"%d",a); ... (2 Replies)
Discussion started by: vijaysabari
2 Replies
Login or Register to Ask a Question

Featured Tech Videos