Skip to content

Default postgres user cannot login or run commands #674

@KevinAtSesam

Description

@KevinAtSesam

Affects Postgres 9.6 - alphine

In a recent change, the default postgres user gets a home folder. Fine in theory, but it has the unfortuante side effect of defining the default shell as /sbin/nologin. This means that you can no longer login as a postgres user.

the easiest way to fix this, is by running a quick sed on /etc/passwd

su root -c "sed -i -e 's|postgresql:/sbin/nologin|postgresql:/bin/ash|g' /etc/passwd"

A more constructive solution would be to set the shell using --shell (-s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions