DEFAULT entry in users file and LDAP, again

Martin Pauly pauly at hrz.uni-marburg.de
Fri Dec 14 15:05:28 CET 2007


Sorry to bother you guys again:

a couple of weeks ago, I asked
> > With a users file like
> > DEFAULT
> >         User-Name = `%{User-Name}`
> >
> > the server complains loudly about the missing Auth-Type when asking with
> > radtest
> >So how do I direct the server to use LDAP without setting Auth-Type?
> >Or is radtest somehow the wrong test tool in the new scenario??

Ivan advised me
> Uncomment ldap in authorize and authenticate sections of radiusd.conf.
and it worked.

Now I'm going for a new production host and thought I'd simply copy
the working radiusd.conf (with minor adjustments, of course).
But again freeradius is unable to determine the proper auth-type. 
Static user entries and those with Auth-Type = System work fine.

In radiusd.conf I have:
modules {

        pap {
                auto_header = yes
        }

        chap {
                authtype = CHAP
        }

        pam {
                pam_auth = radiusd
        }

        unix {
                cache = no

                cache_reload = 600

                shadow = /etc/shadow

                radwtmp = ${logdir}/radwtmp
        }

        ldap ldap1 {
                server = "xxxxx.uni-marburg.de"
                identity = "uid=xxxxx,ou=xxxxx,o=Universitaet Marburg,c=DE"
                password = "xxxxx"
                basedn = "ou=people,ou=Staff,ou=Accounts,o=Universitaet Marburg,c=DE"
                filter = "(&(uid:caseExactMatch:=%{Stripped-User-Name:-%{User-Name}}) (!(UniMrDarfRadius=0)))"

                start_tls = yes
                tls_cacertdir           = /etc/ssl/certs
                tls_require_cert        = "demand"
                dictionary_mapping = ${raddbdir}/ldap.attrmap
                ldap_connections_number = 100
                #timeout: # seconds to wait for LDAP query to finish default: 20
                timeout = 60
                #timelimit: # of seconds server has to process the query (server-side
                #time limit) default: 20
                timelimit = 60
                #net_timeout: # of seconds to wait for response of the server (network
                #failures) default: 10
                net_timeout = 60
        }
[same for ldap2, ldap3]
[...]
} # end of modules
[...]
instantiate {
        ldap1
        ldap2
        ldap3
        eap
        mschap
}

authorize {
        preprocess
        chap
        mschap
        suffix
        eap
        files
          redundant {
            ldap1
            ldap2
            ldap3
          }
        pap
}

authenticate {
        Auth-Type PAP {
                pap
        }

        Auth-Type CHAP {
                chap
        }

        Auth-Type MS-CHAP {
                mschap
        }
        unix
        Auth-Type LDAP {
          redundant {
            ldap1
            ldap2
            ldap3
          }
        }

        eap
} #end of authenticate

The debug output shows a successfull LDAP dialog about authorization, 
but then no Auth-Type is found:


rad_recv: Access-Request packet from host 137.248.3.11:51358, id=100, length=57
        User-Name = "pauly"
        User-Password = "xxxxxxx"
        NAS-IP-Address = 255.255.255.255
        NAS-Port = 10
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
  modcall[authorize]: module "preprocess" returns ok for request 0
  modcall[authorize]: module "chap" returns noop for request 0
  modcall[authorize]: module "mschap" returns noop for request 0
    rlm_realm: No '@' in User-Name = "pauly", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 0
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 0
    users: Matched entry DEFAULT at line 64
radius_xlat:  'pauly'
  modcall[authorize]: module "files" returns ok for request 0
modcall: entering group redundant  for request 0
rlm_ldap: - authorize
rlm_ldap: performing user authorization for pauly
radius_xlat:  '(&(uid:caseExactMatch:=pauly) (!(UniMrDarfRadius=0)))'
radius_xlat:  'ou=people,ou=Staff,ou=Accounts,o=Universitaet Marburg,c=DE'
rlm_ldap: ldap_get_conn: Checking Id: 0
rlm_ldap: ldap_get_conn: Got Id: 0
rlm_ldap: attempting LDAP reconnection
rlm_ldap: (re)connect to auth1.staff.uni-marburg.de:389, authentication 0
rlm_ldap: setting TLS CACert Directory to /etc/ssl/certs
rlm_ldap: setting TLS Require Cert to demand
rlm_ldap: starting TLS
rlm_ldap: bind as uid=xxxxx,ou=xxxxx,o=Universitaet Marburg,c=DE/xxxxxx to auth1.staff.uni-marburg.de:389
rlm_ldap: waiting for bind result ...
rlm_ldap: Bind was successful
rlm_ldap: performing search in ou=people,ou=Staff,ou=Accounts,o=Universitaet Marburg,c=DE, with filter (&(uid:caseExactMatch:=pauly) (!(UniMrDarfRadius=0)))
rlm_ldap: No default NMAS login sequence
rlm_ldap: looking for check items in directory...
rlm_ldap: looking for reply items in directory...
rlm_ldap: user pauly authorized to use remote access
rlm_ldap: ldap_release_conn: Release Id: 0
  modcall[authorize]: module "ldap1" returns ok for request 0
modcall: leaving group redundant  (returns ok) for request 0
rlm_pap: WARNING! No "known good" password found for the user.  Authentication may fail because of this.
  modcall[authorize]: module "pap" returns noop for request 0
modcall: leaving group authorize (returns ok) for request 0
auth: No authenticate method (Auth-Type) configuration found for the request: Rejecting the user
auth: Failed to validate the user.
Delaying request 0 for 1 seconds
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Sending Access-Reject of id 100 to 137.248.xxx.xxx port 51358
 
Thanks for help, Martin

-- 
  Dr. Martin Pauly     Fax:    49-6421-28-26994            
  HRZ Univ. Marburg    Phone:  49-6421-28-23527
  Hans-Meerwein-Str.   E-Mail: pauly at HRZ.Uni-Marburg.DE  
  D-35032 Marburg                                                           



More information about the Freeradius-Users mailing list