Posted: Mon Sep 22, 2003 6:43 am Post subject: Anybody able to run progs under a different user ID (setuid)
Chevalier
Joined: 17 May 2001 Posts: 455
I am trying to write an application on AIX to allow non-mqm users to inquire on the status of an MQ Cluster. I have written a C++ application that uses the MQAI to send PCF commands to the command server. This runs fine under a user who is a member of the mqm group (i.e. me.).
In order to allow non-mqm users to run the program I thought that I could make the program a setuid program by changing the attributes thus:
chmod ug+s myprog
However the program still gets not-authorised when attempting to connect under a non-mqm user. I have tried using the setuid and setgid system calls within the program but am not sure how to get this to work.
You have there two security issues. The first security is related to your OS. You already solved that problem.
Your next problem is the MQSeries security. The end-user should be on the mqm group or give the correspond authority to the user to connect and use the necessary mqseries objects. _________________ Lillo
IBM Certified Specialist - WebSphere MQ
The user/group of the program that has setuid bits on is mqm:mqm.
However, I find that under MQ5.3, IBM have changed the OAM so that it always checks the real user ID. Previously, for programs that were not associated with a shell (e.g. daemons or stuff run from cron I assume) the effective user ID was used.
This indicates to me that the setuid bits of my program are being ignored because I cannot change the real user ID.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum