Closed baimard closed 5 years ago
The code in FreeRADIUS does this:
ret = pam_acct_mgmt(handle, 0);
if (ret != PAM_SUCCESS) {
RERROR("pam_acct_mgmt failed: %s", pam_strerror(handle, ret));
i.e. we call the PAM library, and the PAM library returns a failure. There is very little that we can do in FreeRADIUS to fix an issue with the PAM library.
If FreeRADIUS has the EXACT SAME CONFIGURATION on both machines, then the problem isn't FreeRADIUS. It's something else. i.e. the PAM library and it's configuration.
FYI :
I have the same problem with the official image of freeradius :
https://hub.docker.com/r/freeradius/freeradius-server
We are looking for what is missing from the container.
Thank you for your attention
As I tried to say, you have to configure PAM. Read the PAM documentation for how to do that.
Thank you.
Just for information, if someone have the same problem. I was thinking that the yubikey mapping was enough, but in the docker container you need to create the user by : "useradd
PAM requires users to exist in the local DB (NSS, /etc/passwd, whatever). Otherwise it fails.
FreeRADIUS has no such issue. Which is why we recommend using the rlm_yubikey module that comes with it.
PAM requires users to exist in the local DB (NSS, /etc/passwd, whatever). Otherwise it fails.
Actually in PAM that's the default behaviour, but you can control it via account management group. To make PAM skip local user existence check you need to add that line to your /etc/pam.d/radiusd file (and, possibly, remove any other lines starting with "account"):
account sufficient pam_permit.so
That tells that pam should use pam_permit.so module to verify (that's different from authenticate!) account. And pam_permit.so is a special module that always returns "OK". There must be another line[s] in the file, starting withauth
, that tells pam how to actually authenticate users. Seeman pam.conf
for more info.
Thank you !
Defect
How to reproduce the issue
Build image with official Dockerfile
or :
Output of
[radiusd|freeradius] -X
showing issue occurring(you may need to run
[radiusd|freeradius] -fxx -l stdout
if using eg RADIUS with TLS)problem is here :
On a serveur install on virtual machine with EXACT SAME CONFIGURATION :
Same result with other PAM configuration ...