I killed the processes and backed-up old accounts on the Peregrine UAT server 10.3.28.44
. You can find tarballs for the home folders of all removed accounts on Peregrine UAT at:
10.3.28.44:/root/bak/deleted/users
To remove accounts safely I did the following:
-
Lock the account.
# passwd -l username
-
Backup the home folder.
# tar -zcvf /root/bak/deleted/users/username.$(id -u username).$(date +%Y%m%d%H%M%S).tar.gz /home/username/
-
Check if the user has running processes and if so kill them .
# PROCS="$(pgrep -d, -u username 2>/dev/null)"; if [ -n "$PROCS" ]; then ps -fp $PROCS; else echo "No processes running" 1>&2; fi # killall -KILL -user username
-
Remove the user and its home folder.
# userdel -r username