To disable the user’s command line, you can run the following command:
1 |
usermod -s /sbin/nologin <username> |
At that point, the user will no longer be able to use the command line.
To enable it, run the following command:
1 |
chsh -s /bin/bash <username> |