problem with User-Name & Stripped-User-Name
hi, i'm trying to migrate freeradius 1.3.1 to 2.1.12. 1.3.1 works very fine but I need upgrades and my freeradius server auth in ldap and accounting on mysql.. and the new file configuration have a little change for me.. all fine but not work for me.. the stripped-user-name properly. if i use user-name. i can see in freeradiusd -X the username to can do account into mysql... but in my system i use hints too.. so when i auth with user@domain.. in mysql insert user@domain.. if i use stripped-user-name.. in mysql just insert username as i need.... BUT not happend.. username stay in blank :| i change something in somewhere because before works.. but right now don't know what i change in .confs :S any idea? check some lines in debug mode: User-Name = "emperor" radius packet, .. in radiusd -X using just username without Hints [radutmp] expand: %{User-Name} -> emperor [radutmp] expand: %{Stripped-User-Name:-%{User-Name}} -> emperor, and sql module -> [sql] Improperly nested variable; %{User-Name}} [sql] expand: %{%{Stripped-User-Name}:-%{%{User-Name}}:-DEFAULT} -> '' Using Hints@my.domain.com User-Name = "emperor@my.domain.com" [suffix] No '@' in User-Name = "emperor", looking up realm NULL why not see the @ realm for check hint? my hints conf DEFAULT Suffix == "@my.domain.com", Strip-User-Name = Yes Hint = "userdefault", Service-Type = Framed-User, Framed-Protocol = PPP, in my auth seccion i type suffix to can check it. with just emperor, at sql not insert emperor just blank and with realm @ my.domain.com insert emperor into sql... should be works.. in both case ...... insert emperor. to can checkval mountlycounter for both case the acct-session-time. if need more conf files to can help please i can send more info.. thanxs for all -- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001 -- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001
Tony Peña wrote:
hi, i'm trying to migrate freeradius 1.3.1 to 2.1.12. 1.3.1 works very fine but I need upgrades
and my freeradius server auth in ldap and accounting on mysql.. and the new file configuration have a little change for me.. all fine but not work for me..
It would be useful to use complete sentences. It shows you're trying to communicate what's going on, rather than just dumping random collections of text into an email.
and sql module -> [sql] Improperly nested variable; %{User-Name}}
What part of that is unclear?
[sql] expand: %{%{Stripped-User-Name}:-%{%{User-Name}}:-DEFAULT} -> ''
That is wrong. See "man unlang" for how expansions are handled. What do you expect this to do: %{%{User-Name}} ?? Why did you enter that? Alan DeKok.
2012/8/1 Alan DeKok <aland@deployingradius.com>
Tony Peña wrote:
hi, i'm trying to migrate freeradius 1.3.1 to 2.1.12. 1.3.1 works very fine but I need upgrades
and my freeradius server auth in ldap and accounting on mysql.. and the new file configuration have a little change for me.. all fine but not work for me..
It would be useful to use complete sentences. It shows you're trying to communicate what's going on, rather than just dumping random collections of text into an email.
and sql module -> [sql] Improperly nested variable; %{User-Name}}
What part of that is unclear?
[sql] expand: %{%{Stripped-User-Name}:-%{%{User-Name}}:-DEFAULT} -> ''
That is wrong. See "man unlang" for how expansions are handled.
What do you expect this to do: %{%{User-Name}} ?? Why did you enter that?
i use that because in that way explain in line 25 of sql/mysql/dialup.conf
20 # Uncomment the next line, if you want the sql_user_name to mean: 21 # 22 # Use Stripped-User-Name, if it's there. 23 # Else use User-Name, if it's there, 24 # Else use hard-coded string "DEFAULT" as the user name. 25 sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}}:-DEFAULT}" 26 # 27 #sql_user_name = "%{User-Name}"
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001
Tony Peña wrote:
i use that because in that way explain in line 25 of sql/mysql/dialup.conf
No. The default configuration works. The text you quote below is NOT in the default configuration. And "git" says that line hasn't changed since September 2007. Someone on your system edited the configuration, and broke it. Don't do that. Use the default configuration. It works. Alan DeKok.
all right thanxs.. your correct ,.....maybe in my changes I confuse the line sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" with this works... i have to check my old 1.3.1 to replace the incorrect line. but still warning me deprecated :- to see unlang.. but that i check later.. for now.. what exactly happend.. with radutmp when i send acct-stop not delete into file radutmp?? in 1.3.1 i can use simultaneous-use := 1 and radutmp check if exist in file can't start .. ok... and when send stop radutmp update and delete the user...for a new connection. in this 2.1.12 i start logging 1st time.. with start.. and radtump write user into file... but when i send stop not update.. continue existing there... I cont use simultaneous-use := 1 and can't logging again.. missing something about radutmp in other place???. i can comment use radtump in my site-available/my.domain.com file to forge it but simultaneos should be work but not for sql.. i try to keep of load to ddbb servers. suggest? thanxs again Alan 2012/8/1 Alan DeKok <aland@deployingradius.com>
Tony Peña wrote:
i use that because in that way explain in line 25 of sql/mysql/dialup.conf
No.
The default configuration works. The text you quote below is NOT in the default configuration. And "git" says that line hasn't changed since September 2007.
Someone on your system edited the configuration, and broke it. Don't do that.
Use the default configuration. It works.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001
Hi,
all right thanxs.. your correct ,.....maybe in my changes I confuse the line sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" with this works... i have to check my old 1.3.1 to replace the incorrect line. but still warning me deprecated :- to see unlang.. but that i check later..
its: sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}"
i can comment use radtump in my site-available/[1]my.domain.com file to forge it but simultaneos should be work but not for sql.. i try to keep of load to ddbb servers. suggest?
confusion. are you using the SQL for simulataneous usage, of the radutmp file? there were major changes in some parts of the engine (thats why its 2.x rather than 1.x) so you cant just copy the old configs over... you need to start with a 2.x config bare and default and then adjust it to what you need....or things get very wrong and messy alan
ok but with original not work for me as default uncomment... i have to change sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}" for sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" to can use it.. and i check simultaneous-use by radutmp way. 2012/8/1 alan buxey <A.L.M.Buxey@lboro.ac.uk>
Hi,
all right thanxs.. your correct ,.....maybe in my changes I confuse the line sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" with this works... i have to check my old 1.3.1 to replace the incorrect line. but still warning me deprecated :- to see unlang.. but that i check later..
its:
sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}"
i can comment use radtump in my site-available/[1]my.domain.com file to forge it but simultaneos should be work but not for sql.. i try to keep of load to ddbb servers. suggest?
confusion. are you using the SQL for simulataneous usage, of the radutmp file? there were major changes in some parts of the engine (thats why its 2.x rather than 1.x) so you cant just copy the old configs over... you need to start with a 2.x config bare and default and then adjust it to what you need....or things get very wrong and messy
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001
Hi,
ok but with original not work for me as default uncomment... i have to change sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}" for
sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" to can use it..
as I said, %{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}} is the default entry and works. it stops the deprecated message. your original which you were told to fix was very wrong. have a close look, they are different.
and i check simultaneous-use by radutmp way.
and are you calling the correct modules to ensure that the radutmp file is used? what does radiusd -X show? alan
don't worry for radutmp... In your site-available/default, explain sql for simultaneous is more faster.. so . i change it.. and i test it with radclient again.. doing auth - acct start - (auth for check) - and acct stop to finish session test output tony@hp-pavilion6:~/backup_server/AAA/RADIUS$ ./test-radclient.sh Received response ID 12, code 2, length = 68 Idle-Timeout = 300 Session-Timeout = 7200 Framed-Compression = Van-Jacobson-TCP-IP Framed-MTU = 576 Filter-Id = "general.in" Framed-Protocol = PPP Service-Type = Framed-User Login Name What TTY When From Location Received response ID 93, code 5, length = 20 Login Name What TTY When From Location Received response ID 220, code 3, length = 68 Reply-Message = "\r\nYou are already logged in - access denied\r\n\n" Login Name What TTY When From Location Received response ID 216, code 5, length = 20 Login Name What TTY When From Location so... is fine for now... thanxs for all help. 2012/8/1 alan buxey <A.L.M.Buxey@lboro.ac.uk>
Hi,
ok but with original not work for me as default uncomment... i have to change sql_user_name = "%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}" for
sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}" to can use it..
as I said,
%{%{Stripped-User-Name}:-%{%{User-Name}:-DEFAULT}}
is the default entry and works. it stops the deprecated message. your original which you were told to fix was very wrong. have a close look, they are different.
and i check simultaneous-use by radutmp way.
and are you calling the correct modules to ensure that the radutmp file is used?
what does
radiusd -X
show?
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Antonio Peña Secure email with PGP 0x8B021001 available at http://pgp.mit.edu Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001
participants (3)
-
alan buxey -
Alan DeKok -
Tony Peña