Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usermin on macOS login works only when checking pam_authenticate() is turned off #56

Open
gilcel opened this issue Jan 24, 2020 · 2 comments

Comments

@gilcel
Copy link

gilcel commented Jan 24, 2020

I finally found out how to login with Usermin on macOS.
Tested usermin 1.791 on macOS 10.14.6, perl 5.28 with Authen::PAM 0.16 from macports.org

By modifying "miniserv.pl" by commenting out the the $pamh->pam_authenticate(); at line 145, works!

# check if the PAM authentication can be used by opening a
# PAM handle
...
$pam_username = "test";
$pam_password = "test";
			
#$pamh->pam_authenticate();  # <========= Login WORKS when not used
$use_pam = 1; # HACK set "use_pam to true" on macOS to allow login

Then the "validate_unix_user" subroutine is called, and login works.

If you don't comment out the line (testing $pamh->pam_authenticate() ) then the login will spin forever (tried on Firefox 72 and Safari).

Here's my /etc/pam.d/usermin which works on macOS:

# login: auth account password session
auth	  sufficient	pam_opendirectory.so try_first_pass
auth	  required	pam_deny.so
account	 required		pam_permit.so
password required	pam_deny.so
session	required		pam_permit.so

Anyone had this issue on Linux ?

@gilcel gilcel changed the title Usermin on macOS login works only when checking pam_authenticate() is OFF Usermin on macOS login works only when checking pam_authenticate() is turned off Jan 24, 2020
@jcameron
Copy link
Collaborator

I haven't seen this on Linux, sorry.

You can also turn off PAM by adding the line no_pam=1 to /etc/usermin/miniserv.conf

@gilcel
Copy link
Author

gilcel commented Jan 27, 2020

Thanks for this, but if turning off PAM as you mentioned, login on macOS won't work, since it will then try to retrieve user's password with the command (from /etc/usermin/miniserv.conf):

passwd_file=nidump passwd . |

This is an old and incompatible command, replaced with dsexport since Mac OS X 10.5.

I will try to find a solution and hopefully make a pull request if you don't mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants