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!

  • Very good answer is: unix.stackexchange.com/a/136552/32544 – Kondybas May 15 '15 at 7:57
  • Thanks! i found this thread helped me for the executed pam_session.sh : unix.stackexchange.com/questions/74063/… But i edited the /etc/pam.d/sshd file. – bubele May 15 '15 at 8: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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.