Posted On March 29, 2019

User Accounts Management

kimconnect 0 comments
blog.KimConnect.com >> Linux >> 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

Leave a Reply

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

Related Post

Linux: How to Change Hostname

There are 3 methods:1. hostnamectl command : using systemctl (recommended and shown at the bottom…

Linux: Bash Shell Script To Move/Archive Old Files

# create a script to move files (notice the regex escape for special chars) sudo…

Bash: How To Join Array With Comma Delimiter

# The following function joins an array of numbers # Limitation: the delimiter is expected…
Other project: DragonCoin.com