freeradius <---> sambaNT ldap

Sazzad Hossain sazzad.suzon89 at gmail.com
Thu Aug 26 12:51:13 CEST 2021


Hello Alan,

Thanks for your valuable time and reply.After changing mods-enable/ldap, i
receive this error message.Any suggestions?

Have a nice day!



########################################################################################


0) Received Access-Request Id 183 from 127.0.0.1:39723 to 127.0.1.1:1812
length 76
(0)   User-Name = "riedel"
(0)   User-Password = "testtest1A"
(0)   NAS-IP-Address = 127.0.1.1
(0)   NAS-Port = 1812
(0)   Message-Authenticator = 0xa10676f1ae23f9f3d0183dccfc8e9179
(0) # Executing section authorize from file
/etc/freeradius/3.0/sites-enabled/default
(0)   authorize {
(0)     policy filter_username {
(0)       if (&User-Name) {
(0)       if (&User-Name)  -> TRUE
(0)       if (&User-Name)  {
(0)         if (&User-Name =~ / /) {
(0)         if (&User-Name =~ / /)  -> FALSE
(0)         if (&User-Name =~ /@[^@]*@/ ) {
(0)         if (&User-Name =~ /@[^@]*@/ )  -> FALSE
(0)         if (&User-Name =~ /\.\./ ) {
(0)         if (&User-Name =~ /\.\./ )  -> FALSE
(0)         if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/))  {
(0)         if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/))   ->
FALSE
(0)         if (&User-Name =~ /\.$/)  {
(0)         if (&User-Name =~ /\.$/)   -> FALSE
(0)         if (&User-Name =~ /@\./)  {
(0)         if (&User-Name =~ /@\./)   -> FALSE
(0)       } # if (&User-Name)  = notfound
(0)     } # policy filter_username = notfound
(0)     [preprocess] = ok
(0)     [chap] = noop
(0)     [mschap] = noop
(0)     [digest] = noop
(0) suffix: Checking for suffix after "@"
(0) suffix: No '@' in User-Name = "riedel", looking up realm NULL
(0) suffix: No such realm "NULL"
(0)     [suffix] = noop
(0) eap: No EAP-Message, not doing EAP
(0)     [eap] = noop
(0)     [files] = noop
rlm_ldap (ldap): Reserved connection (0)
(0) ldap: EXPAND (uid=%{%{Stripped-User-Name}:-%{User-Name}})
(0) ldap:    --> (uid=riedel)
(0) ldap: Performing search in "ou=people,dc=de" with filter
"(uid=riedel)", scope "sub"
(0) ldap: Waiting for search result...
(0) ldap: User object found at DN "uid=riedel,ou=people,dc=de"
(0) ldap: Processing user attributes

*(0) ldap: WARNING: No "known good" password added. Ensure the admin user
has permission to read the password attribute(0) ldap: WARNING: PAP
authentication will *NOT* work with Active Directory (if that is what you
were trying to configure)*
rlm_ldap (ldap): Released connection (0)
Need 5 more connections to reach 10 spares
rlm_ldap (ldap): Opening additional connection (5), 1 of 27 pending slots
used
rlm_ldap (ldap): Connecting to ldap://10.9.25.56:389
rlm_ldap (ldap): Waiting for bind result...
rlm_ldap (ldap): Bind successful
(0)     [ldap] = ok
(0)     [expiration] = noop
(0)     [logintime] = noop
(
*0) pap: WARNING: No "known good" password found for the user.  Not setting
Auth-Type(0) pap: WARNING: Authentication will fail unless a "known good"
password is available*
(0)     [pap] = noop
(0)   } # authorize = ok
(*0) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type =
Reject*
(0) Failed to authenticate the user
(0) Using Post-Auth-Type Reject
(0) # Executing group from file /etc/freeradius/3.0/sites-enabled/default
(0)   Post-Auth-Type REJECT {
(0) attr_filter.access_reject: EXPAND %{User-Name}
(0) attr_filter.access_reject:    --> riedel
(0) attr_filter.access_reject: Matched entry DEFAULT at line 11
(0)     [attr_filter.access_reject] = updated
(0)     [eap] = noop
(0)     policy remove_reply_message_if_eap {
(0)       if (&reply:EAP-Message && &reply:Reply-Message) {
(0)       if (&reply:EAP-Message && &reply:Reply-Message)  -> FALSE
(0)       else {
(0)         [noop] = noop
(0)       } # else = noop
(0)     } # policy remove_reply_message_if_eap = noop
(0)   } # Post-Auth-Type REJECT = updated
(0) Delaying response for 1.000000 seconds
Waking up in 0.3 seconds.
Waking up in 0.6 seconds.
(0) Sending delayed response
(0) Sent Access-Reject Id 183 from 127.0.1.1:1812 to 127.0.0.1:39723 length
20
Waking up in 3.9 seconds.
(0) Cleaning up request packet ID 183 with timestamp +18
Ready to process requests

On Wed, Aug 25, 2021 at 5:29 PM Alan DeKok <aland at deployingradius.com>
wrote:

> On Aug 25, 2021, at 11:05 AM, Sazzad Hossain <sazzad.suzon89 at gmail.com>
> wrote:
> > In my ldap(productive) server user password is saved in SambaNT format.
>
>   It's saved as just a hash, with no prefix.
>
> > For
> > test purpose i write clear test password [*radtest user CleartextPassword
> > 127.0.0.1 1812 testing123*] and then obviously it shows error. Can anyone
> > help me What can i do? One more question, when i will test from my test
> > freeradius(server) PC to productive ldap server,should i have to write
> > 127.0.0.1 in the (test)command [ *radtest user CleartextPassword
> 127.0.0.1
> > 1812 testing123* ]?
> ...
> > 0) Received Access-Request Id 79 from 127.0.0.1:50497 to 127.0.0.1:1812
> > length 76
> > (0)   User-Name = "riedel"
> > (0)   User-Password = "testtest1A"
> > (0)   NAS-IP-Address = 127.0.1.1
> > (0)   NAS-Port = 1812
> > (0)   Message-Authenticator = 0x07cfed3ddf824369cf2e958253e1f76b
> > ...
> > rlm_ldap (ldap): Reserved connection (0)
> > (0) ldap: EXPAND (uid=%{%{Stripped-User-Name}:-%{User-Name}})
> > (0) ldap:    --> (uid=riedel)
> > (0) ldap: Performing search in "ou=people,dc=de" with filter
> > "(uid=riedel)", scope "sub"
> > (0) ldap: Waiting for search result...
> > (0) ldap: User object found at DN "uid=riedel,ou=people,dc=de"
> > (0) ldap: Processing user attributes
> > (0) ldap: control:Password-With-Header +=
> '971a62f4bb490cb69e9661cac35a2274'
>
> The Password-With-Header attribute requires that the password is saved
> with a header.  i.e. {nt}971a62f4bb490cb69e9661cac35a2274
>
> > rlm_ldap (ldap): Released connection (0)
> > Need 5 more connections to reach 10 spares
> > rlm_ldap (ldap): Opening additional connection (5), 1 of 27 pending slots
> > used
> > rlm_ldap (ldap): Connecting to ldap://10.9.25.56:389
> > rlm_ldap (ldap): Waiting for bind result...
> > rlm_ldap (ldap): Bind successful
> > (0)     [ldap] = updated
>
>   So LDAP found the user.
>
> > (0)     [expiration] = noop
> > (0)     [logintime] = noop
> > (0) pap: No {...} in Password-With-Header, re-writing to
> Cleartext-Password
> > (0) pap: Removing &control:Password-With-Header
>
>   That seems clear.  There's no header, so the PAP module assumes that the
> password is clear text.
>
> > (0) pap: Comparing with "known good" Cleartext-Password
> > *(0) pap: ERROR: Cleartext password does not match "known good" password*
> > (0) pap: Passwords don't match
>
>  i.e. "testtest1A" doesn't match "971a62f4bb490cb69e9661cac35a2274"
>
>   The solution is either:
>
> * add {nt} to the passwords in LDAP
>
> * or, edit mods-enabled/ldap, and change:
>
>                 control:Password-With-Header    += 'userPassword'
>
> to
>
>                 control:NT-Password     += 'userPassword'
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/devel.html


More information about the Freeradius-Devel mailing list