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.
misc code snippets
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.
Disable Linux User Shell Account
Jul, 29 -- Categories: Linux