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

Useful Linux Command Aliases

# Create an alias command lsn to display files with numerical representation of schmod permissions…

Yum commands to update server

Wanna ace your Linux job interviews? Well, read more Linuxy stuff and cramp your brain…

PowerShell: Probe Remote Machine for Its OS Type

function probeOsType($server){ $ping=test-connection $server -count 1 $ttl=$ping.ResponseTimeToLive $osType=switch($ttl){ {$_ -le 64} {"Linux"; break} # MacOs…