Setuid is the tidiest way i think
su is good for one off stuff and it would
also be a good way to ru nthings if you needed to
run a program as several different users
Dean
Jill Rowling wrote:
>
> What method do people prefer when wanting a program to run as a particular
> user?
> Examples:
> At startup time, in init.d I might want to run a script as user
> "blah"
> 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)
>
> Some solutions:
> su blah -c "/bin/sh myscript"
> (This will prompt for password if I am not already root and "blah"
> needs a password)
> or
> # 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?
>
> Regards,
>
> Jill.
> ___________________________________________
> Jill Rowling
> 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
> Email: [EMAIL PROTECTED]
>
>
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug
--
BONG: http://www.bong.com.au
EMAIL...
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
ICQ: 16867613
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug