1

Hi i have a multiuser centos server running. There are for example 3 users (non root) - each of them have their own homedir. SSH Login is allowed (bash).

How could it be reached, if a user started a background process with:

  • screen
  • nohup
  • etc.

that this proccess be killed if the user logout from ssh-shell or lost the internet connection? All root and processes from the other users should persist. Sorry for my bad english. Thank you for your help!

bubele
  • 11
  • 3
  • Very good answer is: http://unix.stackexchange.com/a/136552/32544 – Kondybas May 15 '15 at 07:57
  • Thanks! i found this thread helped me for the executed pam_session.sh : http://unix.stackexchange.com/questions/74063/kill-user-processess-on-logout But i edited the /etc/pam.d/sshd file. – bubele May 15 '15 at 08:27
  • ok the script works only if each ssh session of user is exiting. and a other problem with php-fpm is still there, if the user owns a pool they will killed too. From php-fpm errorlog: WARNING: [pool sshuser] child 22139 exited on signal 9 (SIGKILL) after 331.926225 seconds from start. Does anybody know a solution with cgroups ? – bubele May 27 '15 at 10:52

0 Answers0