uli1967
Goto Top

Freeradius 3.0 mods-config files authorize Entry does not begin with a user name

Hallo Kollegen,

ich habe für einen Kunden testweise einen freeradius3.0 aufgesetzt mit oauth2-perl Authentifizierung.

Damit sollen sich wifi Clients gegen eine AD authentifizieren.

//https://github.com/jimdigriz/freeradius-oauth2-perl//

Versuche ich den freeradius mit systemd neu zu starten bekomme ich 2 Fehelermeldungen:

**freeradius/3.0/mods-config/files/authorize  Entry does not begin with a user name

 /etc/freeradius/3.0/mods-enabled/files[9]: Instantiation failed for module "files"  
**

Wie muss ich das in der authorize ändern und wie kann ich den Instantination failed Fehler fixen?

Ferner legt freeradius Benutzerpasswörer im Klartext ab. Wie kann ich das so ändern dass er hashes ablegt?


DANKE schonmal

Uli

Content-Key: 82945694079

Url: https://administrator.de/contentid/82945694079

Printed on: April 27, 2024 at 10:04 o'clock

Member: Dani
Dani Mar 13, 2024 at 18:59:40 (UTC)
Goto Top
Moin,
Wie muss ich das in der authorize ändern und wie kann ich den Instantination failed Fehler fixen?
dazu wäre es hilfreich, wenn du deine Konfiguration posten würdest. Meine Glaskugel will heute nicht mehr. face-wink


Gruß,
Dani
Member: aqui
aqui Mar 13, 2024, updated at Mar 14, 2024 at 08:55:21 (UTC)
Goto Top
Hilfreich wäre es auch einmal den Freeradius mit systemctl stop freeradius zu stoppen und ihn manuell mit freeradius -X im Debug Mode laufen zu lassen. Dort sagt er dir dann detailliert was ihn an der Konfiguartion der files Datei stört.
Alles weitere im Freeradius Tutorial.

Nur nebenbei: Vielleicht wäre eine 2FA Lösung mit dem kostenfreien Cisco Duo und FreeRadius einfacher: https://andrewroderos.com/how-to-implement-duo-security-mfa/
Mitglied: 12168552861
12168552861 Mar 13, 2024 updated at 22:28:25 (UTC)
Goto Top
Wie muss ich das in der authorize ändern und wie kann ich den Instantination failed Fehler fixen?
Meine Glaskugel sagt, ein Komma in der/den Zeilen für die Authorize Optionen des Users fehlt oder das führende Tab für die Optionen wurde vergessen.
Behebe also den Syntaxfehler wenn du uns deine authorize nicht zeigen willst.

Syntax-Check:
Each entry of the file begins with a username, followed by a (possibly empty) list of check items, all on one line. The next line begins with a tab, and a (possibly empty) list of reply items. Each item in the check or reply item list is an attribute of the form name = value. Multiple items may be placed on one line, in which case they must be separated by commas. The reply items may be specified over multiple lines, in which case each line must end with a comma, and the last line of the reply items must not end with a comma.
Member: uli1967
uli1967 Mar 14, 2024 at 09:42:52 (UTC)
Goto Top
Hallo zusammen,


@puderpader Du meinst das hier:

#########################################################
223 # You should add test accounts to the TOP of this file! #
224 # See the example user "bob" above.                     # 
225 #########################################################
226 psteinke  Cleartext-Password := "********"  
227             Reply-Message := "Hallo %{User-Name}"  
228 
229 meckart  Cleartext-Password := "w5-E)e;="  
230             Reply-Message := "Hallo %{User-Name}"  
231 
232 uli  Cleartext-Password := "$TyCp3n#!"  
233             Reply-Message := "Hallo %{User-Name}"  
234 
235 DEFAULT Ldap-Group != "Wireless", Auth-Type := Reject  
236 

freeradius -X gibt aus:


/etc/freeradius/3.0/mods-config/files/authorize[69]: Entry does not begin with a user name
Failed reading /etc/freeradius/3.0/mods-config/files/authorize
/etc/freeradius/3.0/mods-enabled/files[9]: Instantiation failed for module "files"  


Gruss Uli
Mitglied: 12168552861
12168552861 Mar 14, 2024 updated at 09:52:48 (UTC)
Goto Top
Jepp ,da ist so gut wie alles falsch. Steht ja oben alles in meinem Kästchen...
Erstens müssen die führenden Nummern weg dann hast du statt TABs Leerzeichen benutzt und es fehlen die Kommas.

Syntaktisch korrekt wäre:
#########################################################
# You should add test accounts to the TOP of this file! #
# See the example user "bob" above.                     # 
#########################################################
psteinke	Cleartext-Password := "********"  
		Reply-Message := "Hallo %{User-Name}"  

meckart	Cleartext-Password := "w5-E)e;="  
	Reply-Message := "Hallo %{User-Name}"  

uli	Cleartext-Password := "$TyCp3n#!"  
	Reply-Message := "Hallo %{User-Name}"  

DEFAULT	Ldap-Group != "Wireless", Auth-Type := Reject  
Member: uli1967
uli1967 Mar 18, 2024 at 11:18:29 (UTC)
Goto Top
Hallo puderpader,

DANKE für deine Hilfe. Ich habe es genauso nun geändert

#########################################################
# You should add test accounts to the TOP of this file! #
# See the example user "bob" above.                     #  
#########################################################
psteinke        Cleartext-Password := "********",  
                Reply-Message := "Hallo %{User-Name}"  

meckart Cleartext-Password := "w5-E)e;=",  
        Reply-Message := "Hallo %{User-Name}"  

uli     Cleartext-Password := "$TyCp3n#!",  
        Reply-Message := "Hallo %{User-Name}"  

DEFAULT Ldap-Group != "Wireless", Auth-Type := Reject  


# NAS-Gruppen (huntgroups)
# Beispiel
#  Hier wird eine NAS-Gruppe mit dem Namen "meeting-room" in der Konfigurationsdatei huntgroups definiert. 
#  Die Angabe des NAS-Ports ist dabei optional und definiert für Switche den phys. Port / Buchse über den der Supplica>
#
meeting-room   NAS-IP-Address == 192.168.3.2, NAS-Port == 8
meeting-room   NAS-IP-Address == 192.168.2.1, NAS-Port == 0-7
meeting-room   NAS-IP-Address == 192.168.1.1, NAS-Port < 23


und freeradius mit der Option -xX gestartet.

Bekomme die gleichen Fehlermeldungen:

Error: /etc/freeradius/3.0/mods-config/files/authorize[69]: Entry does not begin with a user name
Mon Mar 18 12:13:26 2024 : Error: Failed reading /etc/freeradius/3.0/mods-config/files/authorize
Mon Mar 18 12:13:26 2024 : Error: /etc/freeradius/3.0/mods-enabled/files[9]: Instantiation failed for module "files"  

Was stimmt noch nicht?

Gruss Uli
Mitglied: 12168552861
12168552861 Mar 18, 2024 updated at 11:21:29 (UTC)
Goto Top
Was stimmt noch nicht?
Ist immer noch falsch formatiert, sieht man an den führenden Leerzeichen an den Zeilen unter den Usernamen, da müssen zwingend TABs an den Anfang der Zeile !! Bitte unsere Posts genau lesen!
Member: aqui
aqui Mar 18, 2024 updated at 11:23:58 (UTC)
Goto Top
Guckst du zur richtigen Formatierung auch HIER.
Notepad++ und TAB Taste sind deine Freunde! face-wink
Mitglied: 12168552861
12168552861 Mar 18, 2024 updated at 11:41:57 (UTC)
Goto Top
Zitat von @aqui:

Guckst du zur richtigen Formatierung auch HIER.
Da ist es übrigens auch falsch formatiert. Hier müssen TABs in der zweiten Zeile verwendet werden.

Wie oben bereits aus der Doku geschrieben
Each entry of the file begins with a username, followed by a (possibly empty) list of check items, all on one line. The next line begins with a tab, and a (possibly empty) list of reply items. Each item in the check or reply item list is an attribute of the form name = value. Multiple items may be placed on one line, in which case they must be separated by commas. The reply items may be specified over multiple lines, in which case each line must end with a comma, and the last line of the reply items must not end with a comma.
Member: uli1967
uli1967 Mar 18, 2024 at 11:25:26 (UTC)
Goto Top
hier hab ich mal die datei ohne Kommentare gepostet.

https://pastebin.com/nnPARAU2

Hoffe das hilft.

Gruss

Uli
Mitglied: 12168552861
12168552861 Mar 18, 2024 updated at 11:41:06 (UTC)
Goto Top
Zitat von @uli1967:

hier hab ich mal die datei ohne Kommentare gepostet.

https://pastebin.com/nnPARAU2

Hoffe das hilft.
Wie gesagt die Leerzeichen der Zeile unter dem Usernamen müssen durch ein führendes TABs ersetzt werden! Wie oft denn jetzt noch ????????

Wie oben bereits schon zwei mal aus der Doku geschrieben
Each entry of the file begins with a username, followed by a (possibly empty) list of check items, all on one line. The next line begins with a tab, and a (possibly empty) list of reply items. Each item in the check or reply item list is an attribute of the form name = value. Multiple items may be placed on one line, in which case they must be separated by commas. The reply items may be specified over multiple lines, in which case each line must end with a comma, and the last line of the reply items must not end with a comma.
https://freeradius.org/radiusd/man/users.html
Member: aqui
aqui Mar 18, 2024 updated at 11:43:27 (UTC)
Goto Top
Klappt aber dennoch, sind aber ausschliesslich nur TABs was man schlecht sehen kann.

@uli1967
Mit exteren Bilderlinks wie pastebin & Co. inkl. deren Zwangswerbung und Schnüffelpixel usw. machst du dir hier keine Freunde. face-sad
Lasse das und nutze dafür immer die Code Tags!
Oder bei Bildern das Klickicon um Bilder hier direkt einzubetten!
FAQs lesen hilft wirklich. face-wink
Mitglied: 12168552861
12168552861 Mar 18, 2024 updated at 12:45:48 (UTC)
Goto Top
Zitat von @aqui:

Klappt aber dennoch, sind aber ausschliesslich nur TABs was man schlecht sehen kann.
Also wenn ich das hier aus deinem Beitrag im Forum kopiere sind es Leerzeichen

screenshot
Member: aqui
aqui Mar 18, 2024 at 11:51:59 (UTC)
Goto Top
Dir entgeht aber auch nix!! face-big-smile Ich glaube ich habe das Tutorial bzw. die Files damals mit einem Editor "geschönt". Ich befürchte unter Winblows mit dem gruseligen Wordpad... face-wink
Mitglied: 12168552861
12168552861 Mar 18, 2024 updated at 12:04:45 (UTC)
Goto Top
Naja in dem Fall ja, wenn der TO es nach 3 mal darauf Hinweisen noch immer nicht checkt dann würde das ja noch mehr zur Verwirrung beitragen face-wink.
Member: uli1967
uli1967 Mar 18, 2024 at 12:14:29 (UTC)
Goto Top
ich versteh jetzt gatr nichts mehr sorry

als Beispiel steht in den Kommentaren

  1. The canonical testing user which is in most of the
  2. examples.
#
bob Cleartext-Password := "hello"
Reply-Message := "Hello, %{User-Name}"
John Doe Cleartext-Password := "hello"
Reply-Message = "Hello, %{User-Name}"


also habe ich es jetzt so eingetragen:

mit tabs

leerzeichen username

tab Cleartext-Password ,
tab Replay-Message


Doch es funktioniert immer noch nicht . Sorry ich bin wohl zu blöd es zu kapieren.

Gruss Uli
Member: uli1967
uli1967 Mar 18, 2024 at 12:41:15 (UTC)
Goto Top
Problem solved!

1. https://raw.githubusercontent.com/redBorder/freeradius/master/raddb/mods ...

2. so eingetragen ohne leerzeichen am Anfang

meckart    Cleartext-Password := "w5-E)e;="  
            Reply-Message := "Hello, %{User-Name}"  


uli         Cleartext-Password := "$TyCp3n#!"  
            Reply-Message := "Hello, %{User-Name}"  

3. freeradius -xX

 Listening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel
Mon Mar 18 13:39:36 2024 : Debug: Listening on auth address * port 1812 bound to server default
Mon Mar 18 13:39:36 2024 : Debug: Listening on acct address * port 1813 bound to server default
Mon Mar 18 13:39:36 2024 : Debug: Listening on auth address :: port 1812 bound to server default
Mon Mar 18 13:39:36 2024 : Debug: Listening on acct address :: port 1813 bound to server default
Mon Mar 18 13:39:36 2024 : Debug: Opened new proxy socket 'proxy address * port 54757'  
Mon Mar 18 13:39:36 2024 : Debug: Listening on proxy address * port 54757
Mon Mar 18 13:39:36 2024 : Debug: Opened new proxy socket 'proxy address :: port 60607'  
Mon Mar 18 13:39:36 2024 : Debug: Listening on proxy address :: port 60607
Mon Mar 18 13:39:36 2024 : Info: Ready to process requests

jetzt noch schauen wie ich die Kartext passwörter durch hashes ersetzen kann .

DANKE für eure Hilfe sorry für das Brett vorm Kopf. Uli
Member: aqui
Solution aqui Mar 18, 2024 at 12:49:11 (UTC)
Goto Top