i try to run the latest freeradius version with LDAP while I´m facing the following problem:
Radiusd.conf:
Eap {
default_eap_type = leap
}
ldap {
server = "localhost"
basedn = "ou=mainz,dc=mydomain.net"
filter = "(&(sn=%{Stripped-User-Name:-%{User-Name}})(ObjectClass=radiusprofile))"
start_tls = no
access_attr = "dialupAccess"
dictionary_mapping = ${raddbdir}/ldap.attrmap
ldap_connections_number = 5
timeout = 4
timelimit = 3
net_timeout = 1
}
authorize {
preprocess
chap
eap
suffix
files
mschap
ldap
}
authenticate {
Auth-Type PAP {
pap
}
Auth-Type CHAP {
Chap
} Auth-Type MS-CHAP {
mschap
}
unix
Auth-Type LDAP {
ldap
eap
}
LDIF user file:
dn: cn=user1,ou=mainz,dc=mydomain.net
objectclass: top
objectclass: person
objectclass: radiusprofile
objectclass: inetOrgPerson
cn: user1
userPassword:= testpwd
dialupAccess: yes
radiusServiceType: Framed-User
radiusFramedProtocol: PPP
radiusFramedIPAddress: 10.0.0.23
sn: user1
debug message:
# /usr/sbin/radiusd -A -X
rad_recv: Access-Request packet from host 141.26.244.225:1052, id=28, length=138
User-Name = "user1"
Cisco-AVPair = "ssid=uni"
NAS-IP-Address = 10.0.0.3
Called-Station-Id = "00409656234c"
Calling-Station-Id = "000a417d326d"
NAS-Identifier = "ap350"
NAS-Port = 37
Framed-MTU = 1400
NAS-Port-Type = Wireless-802.11
Service-Type = Login-User
EAP-Message = 0x0202000a017573657231
Message-Authenticator = 0x391930aa92b6d67152b89a39368fbbd7
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "chap" returns noop
modcall[authorize]: module "attr_filter" returns noop
rlm_eap: EAP packet type notification id 2 length 10
rlm_eap: EAP Start not found
modcall[authorize]: module "eap" returns updated
rlm_realm: No '@' in User-Name = "user1", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop
users: Matched DEFAULT at 158
modcall[authorize]: module "files" returns ok
modcall[authorize]: module "mschap" returns noop
rlm_ldap: - authorize
rlm_ldap: performing user authorization for user1
radius_xlat: '(&(sn=user1)(ObjectClass=radiusprofile))'
radius_xlat: 'ou=mainz,dc=mydomain.net'
ldap_get_conn: Got Id: 0
rlm_ldap: performing search in ou=mainz,dc=mydomain.net, with filter (&(sn=user1)(ObjectClass=radiusprofile))
rlm_ldap: ldap_search() failed: LDAP connection lost.
rlm_ldap: Attempting reconnect
rlm_ldap: attempting LDAP reconnection
rlm_ldap: closing existing LDAP connection
rlm_ldap: (re)connect to localhost:389, authentication 0
rlm_ldap: bind as / to localhost:389
rlm_ldap: waiting for bind result ...
rlm_ldap: performing search in ou=mainz,dc=mydomain.net, with filter (&(sn=user1)(ObjectClass=radiusprofile))
rlm_ldap: checking if remote access for user1 is allowed by dialupAccess
rlm_ldap: Added password = testpwd in check items
rlm_ldap: looking for check items in directory...
rlm_ldap: looking for reply items in directory...
rlm_ldap: Adding radiusFramedIPAddress as Framed-IP-Address, value 10.0.0.23 & op=11
rlm_ldap: Adding radiusFramedProtocol as Framed-Protocol, value PPP & op=11
rlm_ldap: Adding radiusServiceType as Service-Type, value Framed-User & op=11
rlm_ldap: user user1 authorized to use remote access
ldap_release_conn: Release Id: 0
modcall[authorize]: module "ldap" returns ok
modcall: group authorize returns updated
rad_check_password: Found Auth-Type LDAP
auth: type "LDAP"
modcall: entering group Auth-Type
rlm_ldap: - authenticate
rlm_ldap: Attribute "User-Password" is required for authentication.
modcall[authenticate]: module "ldap" returns invalid
modcall: group Auth-Type returns invalid
auth: Failed to validate the user.
Delaying request 1 for 1 seconds
Finished request 1
Going to the next request
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Sending Access-Reject of id 28 to 141.26.244.225:1052
Waking up in 4 seconds...
--- Walking the entire request list ---
Cleaning up request 1 ID 28 with timestamp 3f7aff57
Nothing to do. Sleeping until we see a request.
It sounds to me like the User-Password value from the Supplicant isn´t carried correctly:
---> "rlm_ldap: Attribute "User-Password" is required for authentication." <---
rad_recv: Access-Request packet from host 141.26.244.225:1052, id=28, length=138
User-Name = "user1"
Hmm, usually after the User-Name entry is a User-Password entry right?
And I think the Password stored in LDAP is delivered correctly cause:
“rlm_ldap: Added password = testpwd in check items”
I have no idea why the User-Password isn´t delivered within the Access-Request packet.
Would be nice if anyone has a idea or could point me into the right direction?
Regards,
cl
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
