SLUG Mailing List Archives
[SLUG] Set UID programs
- To: "Slug (E-mail)" <slug@xxxxxxxxxxx>
- Subject: [SLUG] Set UID programs
- From: Jill Rowling <Rowling@xxxxxxxxxx>
- Date: Thu Oct 19 10:51:36 2000
What method do people prefer when wanting a program to run as a particular
At startup time, in init.d I might want to run a script as user
Or I want to run a program as user "blah" where "blah" has less
privileges than my normal user account.
(Thinks of easily broken things like X and Netscape, hehe)
su blah -c "/bin/sh myscript"
(This will prompt for password if I am not already root and "blah"
needs a password)
# chmod u+s blah myprogram
Then, when called, myprogram should run as user "blah", although it
probably won't work over NFS.
Which is preferable?
Are there other ways of doing it?
Snr Design Engineer & Unix System Administrator
Electronic Engineering Department, Aristocrat Technologies Australia
3rd Floor, 77 Dunning Ave Rosebery NSW 2018
Phone: (02) 9697-4484 Fax: (02) 9663-1412