Radius and LDAP are on the same box and test use localhost 127.0.0.1 as the
interface. LDAP authentication from Sendmail/POP (Running on another machine
across the network) are realtime and I notice no difference in speed of
/etc/passwd versus LDAP with this box.
I notice a lot of
Request....
Done...
Request...
Done....
Which makes me think it is doing far more queries than is necessary.
Here is the log from radius:
The radtest command:
[root@radius root]# radtest michaelm.mebtel.net apassword localhost 1812
testing123 Sending Access-Request of id 137 to 127.0.0.1:1812
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
Sending Access-Request of id 137 to 127.0.0.1
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
Sending Access-Request of id 137 to 127.0.0.1
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
Sending Access-Request of id 137 to 127.0.0.1
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
Sending Access-Request of id 137 to 127.0.0.1
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
Sending Access-Request of id 137 to 127.0.0.1
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
Sending Access-Request of id 137 to 127.0.0.1
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = radius.uchub.com
NAS-Port-Id = "1812"
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=137, length=20
Radius Server Output:
[root@radius raddb]# radiusd -a /var/log -X
Starting - reading configuration files ...
reread_config: reading radiusd.conf
Config: including file: /usr/local/etc/raddb/proxy.conf
Config: including file: /usr/local/etc/raddb/clients.conf
Config: including file: /usr/local/etc/raddb/snmp.conf
Config: including file: /usr/local/etc/raddb/sql.conf
main: prefix = "/usr/local"
main: localstatedir = "/usr/local/var"
main: logdir = "/usr/local/var/log/radius"
main: libdir = "/usr/local/lib"
main: radacctdir = "/usr/local/var/log/radius/radacct"
main: hostname_lookups = no
read_config_files: reading dictionary
read_config_files: reading clients
read_config_files: reading realms
read_config_files: reading naslist
main: max_request_time = 30
main: cleanup_delay = 5
main: max_requests = 1024
main: delete_blocked_requests = 0
main: port = 0
main: allow_core_dumps = no
main: log_stripped_names = no
main: log_auth = no
main: log_auth_badpass = no
main: log_auth_goodpass = no
main: pidfile = "/usr/local/var/run/radiusd.pid"
main: user = "root"
main: group = "root"
main: usercollide = no
main: lower_user = "no"
main: lower_pass = "no"
main: nospace_user = "no"
main: nospace_pass = "no"
main: proxy_requests = yes
proxy: retry_delay = 5
proxy: retry_count = 3
proxy: synchronous = no
proxy: dead_time = 120
main: debug_level = 0
read_config_files: entering modules setup
Module: Library search path is /usr/local/lib
Module: Loaded System
unix: cache = no
unix: passwd = "/etc/passwd"
unix: shadow = "(null)"
unix: group = "/etc/group"
unix: radwtmp = "/usr/local/var/log/radius/radwtmp"
unix: usegroup = no
unix: cache_reload = 600
Module: Instantiated unix (unix)
Module: Loaded LDAP
ldap: server = "ldap"
ldap: port = 389
ldap: net_timeout = 1
ldap: timeout = 2
ldap: timelimit = 5
ldap: identity = "cn=manager,dc=uchub,dc=com"
ldap: start_tls = no
ldap: password = "mypassword"
ldap: basedn = "dc=uchub,dc=com"
ldap: filter = "(uid=%u)"
ldap: default_profile = "(null)"
ldap: profile_attribute = "(null)"
ldap: access_group = "(null)"
ldap: password_header = "(null)"
ldap: password_attribute = "(null)"
ldap: access_attr = "(null)"
ldap: groupname_attribute = "cn"
ldap: groupmembership_filter =
"(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupO
fUniqueNames)(uniquemember=%{Ldap-UserDn})))"
ldap: dictionary_mapping = "/usr/local/etc/raddb/ldap.attrmap"
ldap: ldap_debug = 40
rlm_ldap: reading ldap<->radius mappings from file
/usr/local/etc/raddb/ldap.attrmap
rlm_ldap: LDAP radiusCheckItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusReplyItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusAuthType mapped to RADIUS Auth-Type
rlm_ldap: LDAP npSessionsAllowed mapped to RADIUS Simultaneous-Use
rlm_ldap: LDAP radiusCalledStationId mapped to RADIUS Called-Station-Id
rlm_ldap: LDAP radiusCallingStationId mapped to RADIUS Calling-Station-Id
rlm_ldap: LDAP radiusServiceType mapped to RADIUS Service-Type
rlm_ldap: LDAP radiusFramedProtocol mapped to RADIUS Framed-Protocol
rlm_ldap: LDAP radiusFramedIPAddress mapped to RADIUS Framed-IP-Address
rlm_ldap: LDAP radiusFramedIPNetmask mapped to RADIUS Framed-IP-Netmask
rlm_ldap: LDAP radiusFramedRoute mapped to RADIUS Framed-Route
rlm_ldap: LDAP radiusFramedRouting mapped to RADIUS Framed-Routing
rlm_ldap: LDAP radiusFilterId mapped to RADIUS Filter-Id
rlm_ldap: LDAP radiusFramedMTU mapped to RADIUS Framed-MTU
rlm_ldap: LDAP radiusFramedCompression mapped to RADIUS Framed-Compression
rlm_ldap: LDAP radiusLoginIPHost mapped to RADIUS Login-IP-Host
rlm_ldap: LDAP radiusLoginService mapped to RADIUS Login-Service
rlm_ldap: LDAP radiusLoginTCPPort mapped to RADIUS Login-TCP-Port
rlm_ldap: LDAP radiusCallbackNumber mapped to RADIUS Callback-Number
rlm_ldap: LDAP radiusCallbackId mapped to RADIUS Callback-Id
rlm_ldap: LDAP radiusFramedIPXNetwork mapped to RADIUS Framed-IPX-Network
rlm_ldap: LDAP radiusClass mapped to RADIUS Class
rlm_ldap: LDAP radiusSessionTimeout mapped to RADIUS Session-Timeout
rlm_ldap: LDAP radiusIdleTimeout mapped to RADIUS Idle-Timeout
rlm_ldap: LDAP radiusTerminationAction mapped to RADIUS Termination-Action
rlm_ldap: LDAP radiusLoginLATService mapped to RADIUS Login-LAT-Service
rlm_ldap: LDAP radiusLoginLATNode mapped to RADIUS Login-LAT-Node
rlm_ldap: LDAP radiusLoginLATGroup mapped to RADIUS Login-LAT-Group
rlm_ldap: LDAP radiusFramedAppleTalkLink mapped to RADIUS
Framed-AppleTalk-Link
rlm_ldap: LDAP radiusFramedAppleTalkNetwork mapped to RADIUS
Framed-AppleTalk-Network
rlm_ldap: LDAP radiusFramedAppleTalkZone mapped to RADIUS
Framed-AppleTalk-Zone
rlm_ldap: LDAP radiusPortLimit mapped to RADIUS Port-Limit
rlm_ldap: LDAP radiusLoginLATPort mapped to RADIUS Login-LAT-Port
Module: Instantiated ldap (ldap)
Module: Loaded preprocess
preprocess: huntgroups = "/usr/local/etc/raddb/huntgroups"
preprocess: hints = "/usr/local/etc/raddb/hints"
preprocess: with_ascend_hack = no
preprocess: ascend_channels_per_line = 23
preprocess: with_ntdomain_hack = no
preprocess: with_specialix_jetstream_hack = no
preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
realm: format = "suffix"
realm: delimiter = "@"
Module: Instantiated realm (suffix)
Module: Loaded files
files: usersfile = "/usr/local/etc/raddb/users"
files: acctusersfile = "/usr/local/etc/raddb/acct_users"
files: compat = "no"
Module: Instantiated files (files)
Module: Loaded detail
detail: detailfile =
"/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail"
detail: detailperm = 384
detail: dirperm = 493
Module: Instantiated detail (detail)
Module: Loaded radutmp
radutmp: filename = "/usr/local/var/log/radius/radutmp"
radutmp: username = "%{User-Name}"
radutmp: perm = 384
radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Listening on IP address *, ports 1812/udp and 1813/udp, with proxy on
1814/udp. Ready to process requests.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: attempting LDAP reconnection
rlm_ldap: (re)connect to ldap:389, authentication 0
rlm_ldap: bind as cn=manager,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 2 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 0
Going to the next request
--- Walking the entire request list ---
Cleaning up request 0 ID 137 with timestamp 3c957102
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 3 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 1
Going to the next request
--- Walking the entire request list ---
Cleaning up request 1 ID 137 with timestamp 3c957116
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 4 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 2
Going to the next request
--- Walking the entire request list ---
Cleaning up request 2 ID 137 with timestamp 3c957120
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 5 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 3
Going to the next request
--- Walking the entire request list ---
Cleaning up request 3 ID 137 with timestamp 3c95712b
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 6 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 4
Going to the next request
--- Walking the entire request list ---
Cleaning up request 4 ID 137 with timestamp 3c957135
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 7 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 5
Going to the next request
--- Walking the entire request list ---
Cleaning up request 5 ID 137 with timestamp 3c95713f
Nothing to do. Sleeping until we see a request.
rad_recv: Access-Request packet from host 127.0.0.1:1071, id=137, length=71
User-Name = "michaelm.mebtel.net"
Password = "8\332{a\302\027\234\373\336\371((\373D\242E"
NAS-IP-Address = 255.255.255.255
NAS-Port-Id = "1812"
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
users: Matched DEFAULT at 100
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type ldap
auth: type "Ldap"
modcall: entering group authenticate
rlm_ldap: - authenticate
rlm_ldap: login attempt by "michaelm.mebtel.net" with password "mypassword"
radius_xlat: '(uid=michaelm.mebtel.net)'
radius_xlat: 'dc=uchub,dc=com'
rlm_ldap: performing search in dc=uchub,dc=com, with filter
(uid=michaelm.mebtel.net)
request 8 done
rlm_ldap: user DN: uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com
rlm_ldap: (re)connect to ldap:389, authentication 1
rlm_ldap: bind as
uid=michaelm.mebtel.net,ou=People,dc=uchub,dc=com/mypassword
rlm_ldap: waiting for bind result ...
request 1 done
rlm_ldap: user michaelm.mebtel.net authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authenticate returns ok
Sending Access-Accept of id 137 to 127.0.0.1:1071
Finished request 6
Going to the next request
--- Walking the entire request list ---
Cleaning up request 6 ID 137 with timestamp 3c957149
Nothing to do. Sleeping until we see a request.
-----Original Message-----
From: Alan DeKok [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 11:26 AM
To: [EMAIL PROTECTED]
Subject: Re: LDAP
"Michael S. McCollough" <[EMAIL PROTECTED]> wrote:
> The debug messages were included with the original message. I did not
> see anything that looked like errors, I only noticed it was still
> making ldap queries after the access-accept packet was sent back to
> radtest.
That shouldn't happen.
> I do have it working reliably although slowly (it
> takes about 5 requests from radtest before sending the access-accept
> back).
That says there's a serious problem. It *should* be much faster than
that.
Maybe DNS is slow? Maybe your LDAP server is slow?
Alan DeKok.
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html