Forum Moderators: bakedjake
So what would be ideal is to setup SSHd so that when a user logs into the Root account, the newly created shell is given a NICE priority schedule of -15 (or whatever you want).
I know that I can re-prioritise the shell following a login, but when it's running slow it's a nightware. I'd much prefer that automated.
Anyone know if this is possible? Ideally I do not want to prioritise user shells, just those belonging to root.
I tried re-scheduling SSHd itself to -15, but that doesn't seem to re-schedule its spawned shells.
Thanks!
TJ
But that is the beauty of open-source software! Download the source, find where the user shell is spawned, and change the priority. Better yet, add a command-line option, and contribute the change back to the source tree.
Oh, wait... isn't there a way to get sshd to run a command, rather than spawn a shell? You can do this on a per-user basis, I believe configured in sshd.conf. So, configure it to run a command that "nice's" a shell.
I know that I can re-prioritise the shell following a login, but when it's running slow it's a nightware. I'd much prefer that automated.
Putting the command to change the priority in your .bash_profile or .bashrc file (or whatever configuration file your specific shell is reading during startup) might do the trick.