Alter password expiry date to force user to change password on next login.
Securely change user password using shell script to automate this task on these rare occasions.
Use encrypted passwords to automatically setup users using configuration management tools like Puppet or Ansible.
Sometimes, I want to prevent regular users from logging into the system to perform more complex operations. To achieve that, I am using Pluggable Authentication Modules for Linux to temporarily disable user logins.
If you are wondering how to count only local users ignoring system accounts, I will give you a concise and straight answer.