I am using pam_linotp module to authenticate OpenVPN users against LinOTP server. My purpose is to use this pam_linotp module along with openvpn's plugin (openvpn-auth-ldap) for authentication against an ldap.
Before, I was using openvpn-auth-ldap plugin and google-authenticator pam module and a user would provide the client an ldap password and the OTP like <ldap.pass+OTP> (the openvpn server configuration says... first:ldap authentication, second: OTP check).
Replacing google-authenticator pam with pam_linotp module doesn't work providing <ldap.pass+PIN+OTP>.
logs:
-linotp server:
2014/02/10 - 10:38:50 WARNI {140235505108736} [linotp.lib.token][finish_check_TokenList #1310] [__checkTokenList] user u'username'@u'local' failed to authenticate.
-openvpn server:
Mon Feb 10 10:38:45 2014 us=240636 clientIP:1036 PLUGIN_CALL: POST /usr/lib/openvpn/plugin/lib/openvpn-auth-ldap.so/PLUGIN_AUTH_USER_PASS_VERIFY status=0
--(the above mean ldap-plugin authentication success!!)--
AUTH-PAM: BACKGROUND: received command code: 0
AUTH-PAM: BACKGROUND: USER: username
AUTH-PAM: BACKGROUND: my_conv[0] query='Your OTP:' style=1
AUTH-PAM: BACKGROUND: user 'username' failed to authenticate: Authentication failure
My questions are:
- am I doing something wrong?
or
- pam_linotp is not made to work like this?
thank you,
Alex
> In your scenario you could take a different approach, by stacking
> several pam modules:
>
> auth required pam_ldap
>
> auth required pam_linotp
>
> Thus you would get two password prompts, but you could enter ldap
> password, otp pin and otp value.
I already use auth-ldap openvpn's plugin which suits me well, so I would'd try pam_ldap, so...
so far I understand that pam_linotp takes <fixedpassword+otpvalue> and passes it to LinOTP server. There it is split to <fixedpassword> and <otpvalue>. <otpvalue> is check against otp and <fixedpassword> against:
- PIN OTP
- passwd - useridresolver = passwdresolver
- ldap - useridresolver = ldap (in enterprise edition)
(no order, whatever is configured)
- So, how can I not set an OTP-PIN ? just not typing anything when prompt ?
- Using the passwdresolver, and not set an OTP-PIN the <fixedpassword> should be checked against passwd.
- How can I change the "style=1" value in pam_linotp so I can see in pam logs what is the password send to linotp server ?
Can the above be set?
thanks in advance,
Alex
I gave values like:
Policy name: noPIN
Scope: authentication
Action: otppin=1 (the doc says it should check the passwd file)
User: <nothing here>
Realm: local (this is the name I gave to it at the first place)
Client: <nothing here>
Time: <nothing here>
also checked the "active" checkbox, so in the list there is "Active 1".
But the validation interface (.../validate/check?...) comes with:
"error": {"message": "validate/check failed: Sorry, currently no support for shadow passwords","code": -311}
should I specify something more?
Alex
reading the man page of linotp-create-pwidresolver-user I created a passwd file for a user:
linotp-create-pwidresolver-user -u username -i uid -p password > passwd-file
Then created a new useridresolver based on this file and a new realm as well.
In the policy settings :
Policy name: noPIN
Scope: authentication
Action: otppin=1
User: <nothing here>
Realm: test
Client: <nothing here>
Time: <nothing here>
The /validate/check interface returned "true" only when I provided the realm (&realm=test&...) or when I set this realm as default.
By the way is there a way to create the passwird file for more than one users, like copying the local users from passwd?
regards,
Alex