On 8/8/05, Rosenstrauch, David <[EMAIL PROTECTED]> wrote: > > su - username -c "commandtorun" > Ick. I was hoping for a better way.
That's actually a fairly standard way of doing it. Most udev runnable programs do this... i.e. Xandros has a udev script to open up konqeror (sp?) when a usb device is plugged in. The best way to do this is to take advantage of the fact that root can always su downwards to another user. Though, you'd want to nice the process, because it will be running as a root process and therefore have higher priority. Usually, if the application is supposed to be ran as a non-root user it contains the ability inside itself to switch to that user (most web servers do this). You don't want to script something like that - it's bad bad bad. Mind if I ask what is supposed to run as a non-root user? _______________________________________________ arch mailing list [email protected] http://www.archlinux.org/mailman/listinfo/arch
