Disable Linux User Shell Account

Jul, 29 -- Categories: Linux

Type the following command to disable shell access for tom:

# chsh -s /sbin/nologin {username}
# chsh -s /sbin/nologin tom

Sample Outputs:

Changing shell for tom
Shell changed.