Account de-activation
# Mark account as expired to prevent login
chage --expiredate 0 <username>
# Lock the account and remove shell to prevent shell access
usermod –lock –expiredate 1 –shell /bin/nologin <username>
Account deletion
# Prior to deletion, backup any user files
find / -xdev -user <username> -print0 | xargs -0 tar cfz <username>.tar.gz
# Delete any user cron jobs
crontab -r -u <username>
# Stop any proceses running as the user (scripts, multiplexed terminals, etc.)
killall -KILL -u <username>
# Delete the user account and home directory
userdel -r -f <username>