Skip to content

External auth with pam does not work when the salt-master is NOT running as root #7762

@anitakrueger

Description

@anitakrueger

My salt-master process is running as user salt, like configured in /etc/salt/master:

# The user to run the salt-master as. Salt will update all permissions to
# allow the specified user to run the master. If the modified files cause
# conflicts set verify_env to False.
user: salt

The salt system user was created as follows:

groupadd salt
useradd -m -g salt salt

I also have external_auth enabled for other users (originally I was trying to access the halite gui) like below:

external_auth:
  pam:
    vagrant:
      - .*
    anita:
      - .*
      - '@runner'
      - '@wheel'

With that configuration, pam authentication for the users vagrant and anita always fail:

root@salt:/etc/salt# salt -a pam '*' test.ping
username: vagrant
password: 
Failed to authenticate, is this user permitted to execute commands?

As soon as I run salt-master as root, everything starts working.

Am I missing some configuration? I tried adding my local users to the "salt" group, but no avail.

I've reproduced this with a mint salt master and minions from https://github.com/elasticdog/salt-sandbox running Salt 0.17.0.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-low4th level, cosemtic problems, work around exists

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions