Removing a user’s access (but not his files)

#Lock acct
passwd -l user

#Move directory to avoid .ssh, .rhosts, etc
mv /home/user /home/user.removed

#Check for running jobs
ps awux | grep -i ^user
skill -KILL user

#Check for cron jobs
crontab -u user -e

#remove user from sudo users file if needed

Advertisements

Comments are closed.

%d bloggers like this: