linux login as user code example
Example 1: change user linux
sudo su - username
Example 2: set linux user to login
To allow a system user to log in, you can use usermod to change its login shell to bash:
usermod -s /bin/bash user
sudo su - username
To allow a system user to log in, you can use usermod to change its login shell to bash:
usermod -s /bin/bash user