On Mon, Jul 12, 2004 at 03:05:33PM -0600, J. Troy Carpenter wrote: > Is there a away to set up a particular user such that every command > they perform from the command line is scheduled with a specific > priority (be it low or high)?
There are a couple different ways to go about it. Personally, I would
just write a wrapper shell:
[EMAIL PROTECTED]:~$ cat niced_bash.c
#include <unistd.h>
int main( int argc, char** argv, char** envp )
{
nice( 19 );
execve( "/bin/bash", argv, envp );
}
Copy it to /bin/niced_bash, then edit the passwd to use your wrappered
shell:
demoted:x:1005:100::/home/demoted:/bin/niced_bash
I wrote this up really quick and tested it, and everything seemed to
go smoothly on my box. Depending on exactly what you need to do, this
may need some tweaking.
Mike
.___________________________________________________________________.
Michael A. Halcrow
Security Software Engineer, IBM Linux Technology Center
GnuPG Fingerprint: 05B5 08A8 713A 64C1 D35D 2371 2D3C FDDA 3EB6 601D
I didn't say it was your fault. I only said I was going to blame
you.
pgpajGNrUygHg.pgp
Description: PGP signature
____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
