[wplug] /usr/bin/nice /bin/bash
Christian Höltje
list.wplug at docwhat.gerf.org
Sat Aug 6 02:36:50 EDT 2005
* Logan (lws118 at psu.edu) [050803 17:49]:
> Is there a way to set the default priority of a person's shell?
> test:x:uid:gid::/home/test:/usr/bin/nice /bin/bash
> (in /etc/passwd) doesn't work, and neither does escaping the space.
>
> I'm a bit concerned about trying to do it that way anyhow, as users can just
> use the chsh command to change their default shell unless I give them a
> restricted shell - which I don't necessarily want to do.
The best way (no secuity holes to worry about) is to use PAM's
resource limits module:
http://www.gpfn.sk.ca/techteam/pam/pam-6.html#ss6.8
Depending on your distro, you migþt have a file called:
/etc/security/lmits.conf
In my distro, it has a nice description of how to configure it.
Remember to keep a root shell open while testing this. :-/
In my case, I'd just add the following line:
offendinguser hard priority 5
This would run the user "offendinguser" at priority 5 (aka nice 5)
PAM is cool. :-)
Even better, on most newer distros, this will impact the user
whether they user ftp, http auth, ssh, telnet, or a console shell.
:-)
Ciao!
--
Fact #10
Software estimation is usually done by the wrong people.
-- "Facts and Fallacies of Software Engineering"
(Robert L. Glass, 2002)
The Doctor What: <fill in the blank> http://docwhat.gerf.org/
docwhat *at* gerf *dot* org KF6VNC
Outgoing mail is certified Virus Free.
Checked by Debian GNU/Linux (http://www.debian.org).
Version: 3.0 / 9316 out of 12306 packages installed
More information about the wplug
mailing list