rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

Disable Shell Accounts

Disable shell accounts will allow the account to be active without the ability to login on your server.

To see which active accounts are on your server, run:

cat /etc/passwd | egrep -v '\/false|\/nologin|\/shutdown|\/halt' | cut -d':' -f 1,7

You can disable account using this command:

usermod -s /usr/sbin/nologin "username"       (without quotes)

Example of user that can be disabled: