[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting effective UID for a shell script



At 2002-05-15T04:05:08Z, Alex Malinovich <demonbane@the-love-shack.net> writes:

> How can I set the effective UID for a shell script? I've got a script
> which checks if xscreensaver is running and if not, starts it and then
> activates it. However, the script always gets run as root (it's being run
> as an APM script). This doesn't work if I'm logged in as myself since
> xscreensaver will think it's dealing with root.

My new favorite answer is "use sudo".  It lets you give certain users
permission to execute certain programs (including scripts) as particular
other user, with or without prompting for a password.  It's very well
supported across a range of Unices, so once you learn how to configure it,
you can use it on pretty much every system you'll ever run.
-- 
Kirk Strauser


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: