Here's my workaround that, once set up, requires no further intervention by the sysadmin (me) in our corporate environment:
In short, we are creating a shell script to kill all the remaining user processes after logging out of GNOME, setting that script suid root, and having gdm call that script upon log out.
Here's my workaround that, once set up, requires no further intervention by the sysadmin (me) in our corporate environment:
In short, we are creating a shell script to kill all the remaining user processes after logging out of GNOME, setting that script suid root, and having gdm call that script upon log out.
$ cat /usr/local/ bin/kill- stragglers- auto
#!/bin/bash
# takes 1 argument: the username of the user who logged off
USER=$1 stragglers- auto.errors. log
sudo kill -9 $( ps U $USER | grep -v TTY | awk '{print $1}' ) 2> /tmp/kill-
sudo /etc/init.d/gdm restart
$ sudo chmod +s /usr/local/ bin/kill- stragglers- auto
$ ls -lh /usr/local/ bin/kill- stragglers- auto bin/kill- stragglers- auto
-rwsr-sr-x 1 root root 213 Aug 27 18:32 /usr/local/
$ cd /etc/gdm/ PostSession
$ ls -lh
total 8.0K
-rwxr-xr-x 1 root root 395 Aug 27 18:30 Default
-rwxr-xr-x 1 root root 305 Aug 27 18:29 Default.080827.orig
$ tail Default
fi
done
IFS=$OLD_IFS
echo "$OUTPUT"
}
# the following was added by toobuntu on 080827: bin/kill- stragglers- auto ${USER}
/usr/local/
exit 0
Hope this helps someone!