[SOLVED] What pam file is used to log in with the webui?

kv71h

New Member
Jun 9, 2024
18
3
3
Hi, i would like to run a script when somebody logs in using PAM authentication via the webui. You can do this by adding a line to a pam configuration file in /etc/pam.d/ , But there seems to be no proxmox related file, what pam config file does the webui use for logging in users?
 
  • Like
Reactions: bbgeek17
PVE will use "proxmox-ve-auth" as service name. so you can either create and configure that, or it will fall back to the default one.
 
So i can make a file named "proxmox-ve-auth" in "/etc/pam.d/" and it will use that file?
 
I just created the file "proxmox-ve-auth" by doing cp other proxmox-ve-auth because i read this line: "If the file does not exist, pam will use `/etc/pam.d/other`". I added my script line but it didn't run. Any ideas why it didn't?
 
what do you mean with "added my script line"?
 
I have to add a line of text to the pam file that will run a script, here's the line: session optional pam_exec.so seteuid /path/to/script.sh

Thank you for the quick replies.
 
PVE doesn't open a session (as there are no sessions in PVE).. it only does authentication and account validation.
 
So i'm guessing auth optional pam_exec.so seteuid /path/to/script.sh would work then?
 
edit at the top and select the prefix ;)
 
please don't hijack unrelated threads - post your question in a new thread, or if there is a clearly matching one with the same issue/question, post it there.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!