User Accounts Management

# Method 1
# Disable account while still retain “sudo su userX”
 
# Block a user
chage -E 0 userX
 
# Set account as expired
usermod –expiredate 1 userX
 
# Method 2
# This will render “sudo su userX” inaccessible
# Note: this method doesn’t disable other authentication tokens (e.g. ssh keys)
 
# Lock account
passwd -l userX
Posted on Categories Linux

Leave a Reply

Your email address will not be published. Required fields are marked *