Disable a Linux User Account: Methods and Best Practices
Disabling a user account is a common administrative task. Whether you’re offboarding an employee, removing an unused service account, or securing a compromised account, there are several approaches depending on your requirements. Lock the account with usermod The simplest method is to lock the password hash: sudo usermod -L username This prepends an exclamation mark…
