blob: c0af2ee5210f0042b3dd7741cb3410ec676e79e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
diff --git a/salt/auth/pam.py b/salt/auth/pam.py
index 6e179deb7c..935c523606 100644
--- a/salt/auth/pam.py
+++ b/salt/auth/pam.py
@@ -228,7 +228,7 @@ def authenticate(username, password):
env["SALT_PAM_PASSWORD"] = password
env["SALT_PAM_SERVICE"] = __opts__.get("auth.pam.service", "login")
env["SALT_PAM_ENCODING"] = __salt_system_encoding__
- pyexe = pathlib.Path(__opts__.get("auth.pam.python", "/usr/bin/python3")).resolve()
+ pyexe = pathlib.Path(__opts__.get("auth.pam.python", f"/usr/bin/{os.environ['EPYTHON']}")).resolve()
pyfile = pathlib.Path(__file__).resolve()
if not pyexe.exists():
log.error("Error 'auth.pam.python' config value does not exist: %s", pyexe)
|