Debug for user with nologin / headless in linux

For users such as postfix, jenkins with nologin in linux

You can login like:

$ sudo su - jenkins -s /bin/bash

Or you can temporarily change it to, for example:
usermod -s /bin/bash postfix
for debugging.


You need to change back to /sbin/nologin though.

You can do the other way:

$ sudo chsh -s /bin/bash postfix
Changing shell for postfix.
Shell changed.
$ getent passwd postfix | cut -d: -f7
/bin/bash
sudo chsh -s /sbin/nologin postfix  (or /bin/false)
Changing shell for postfix.
See also:

How to check/change a user's default login shell


Popular posts from this blog

How to get Active Transactions and Locks from MySQL

Example of a PAC file