LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setuid question, or how to run a program with different ID (https://www.linuxquestions.org/questions/linux-newbie-8/setuid-question-or-how-to-run-a-program-with-different-id-202639/)

linuxfond 07-08-2004 12:25 PM

setuid question, or how to run a program with different ID
 
There is a nice program on my PC - niceprogram.
While it runs smoothely with user ID 501 (userA), it doesn't run with user ID 502 (userB).

There is no problem when userA is logged into the machine. The problem is with the userB. The work around I found till now is to type into the terminal:
$ su userA
password:
$ niceprogram

I wonder if there is way to combine all three steps into one step?

Maybe it has something to do with setuid?
Maybe, a little #bin/bash will do the job?

userB is not a root, the program is owned by the root, I guess, though it was installed by userA.

Any comment?

Gnuru 07-08-2004 12:33 PM

To cut it to two steps:

su userA -c niceprogram

you still have to enter the password

To do it in one step, edit your /etc/sudoers file so you can do:

sudo niceprogram

Tinkster 07-08-2004 12:34 PM

Post the output of
ls -l
of the file and the directory it lives in?


Cheers,
Tink

linuxfond 07-09-2004 04:27 AM

ls -l

-rwxr-xr-x 1 root root 1145985 Jul 7 22:41 gjiten*


Here it is. The program is gjiten


All times are GMT -5. The time now is 07:43 AM.