Skip to content

fix mk_postgres.py to run su with '-s /bin/sh' to make it work even if the users shell is /sbin/nologin#887

Open
robertdahlem wants to merge 1 commit intoCheckmk:masterfrom
robertdahlem:mk-postgres-su-for-nologin
Open

fix mk_postgres.py to run su with '-s /bin/sh' to make it work even if the users shell is /sbin/nologin#887
robertdahlem wants to merge 1 commit intoCheckmk:masterfrom
robertdahlem:mk-postgres-su-for-nologin

Conversation

@robertdahlem
Copy link
Contributor

General information

mk_postgres.py runs commands as the Postgres database user with su - $POSTGRESUSER ...
This doesn't work when the users login shell is something like /sbin/nologin. In this case you get "This account is currently not available."

This patch runs commands with su -s /bin/sh $POSTGRESUSER ... instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants