Digital Marketing

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.

Comments

Popular posts from this blog

Make online money from the Internet