ntlm_auth with ms-chap

Jürgen Obermeyer om at oegym.de
Sat Sep 1 14:17:55 CEST 2018


>   Well, radclient implements MS-CHAP correctly.  And again, FreeRADIUS is just handing the MS-CHAP data to Samba, and having Samba authenticate it.

Not able to get ntlm_auth working, I switched now to krb5. 'radtest' says:

***

root at hermes:~# radtest om topsecret localhost 0 testing123
Sent Access-Request Id 34 from 0.0.0.0:41742 to 127.0.0.1:1812 length 72
	User-Name = "om"
	User-Password = "topsecret"
	NAS-IP-Address = 192.168.6.1
	NAS-Port = 0
	Message-Authenticator = 0x00
	Cleartext-Password = "topsecret"
Received Access-Accept Id 34 from 127.0.0.1:1812 to 0.0.0.0:0 length 20

***

And the debug output is:

***

(0) Received Access-Request Id 34 from 192.168.0.1:41742 to
127.0.0.1:1812 length 72
(0)   User-Name = "om"
(0)   User-Password = "topsecret"
(0)   NAS-IP-Address = 192.168.6.1
(0)   NAS-Port = 0
(0)   Message-Authenticator = 0xa81ba8bb09dc97f2bb249085b847fc16
(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 = "om", 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: users: Matched entry DEFAULT at line 1
(0)     [files] = 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) Found Auth-Type = Kerberos
(0) # Executing group from file /etc/freeradius/3.0/sites-enabled/default
(0)   Auth-Type Kerberos {
rlm_krb5 (krb5): Reserved connection (0)
(0) krb5: Using client principal "om at OEGYM.DE"
(0) krb5: Retrieving and decrypting TGT
(0) krb5: Attempting to authenticate against service principal
rlm_krb5 (krb5): Released connection (0)
Need 5 more connections to reach 10 spares
rlm_krb5 (krb5): Opening additional connection (5), 1 of 27 pending
slots used
(0)     [krb5] = ok
(0)   } # Auth-Type Kerberos = ok
(0) # Executing section post-auth from file
/etc/freeradius/3.0/sites-enabled/default
(0)   post-auth {
(0)     update {
(0)       No attributes updated
(0)     } # update = noop
(0)     [exec] = 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 = noop
(0) Sent Access-Accept Id 34 from 127.0.0.1:1812 to 192.168.0.1:41742
length 0
(0) Finished request
Waking up in 4.9 seconds.
(0) Cleaning up request packet ID 34 with timestamp +8
Ready to process requests

***

May I ignore the "PAP WARNINGS"? And will wireless clients (or the
users) authenticate if 'radtest' (via ssh) is successfull?

Jürgen


More information about the Freeradius-Users mailing list