Hi All; I have been reading unlang and also digging the Internet for help with my issue. I have added the following line to "vi sql/mysql/dialup.conf" #Comented out this line #sql_user_name = "%{User-Name}" #as per the man pages: # Double-quoted strings are expanded by inserting the value of any variables # Single-quoted strings are evaluated as-is. if("%{User-Name}" == 'london'){ sql_user_name = "hasworked" } And i try to logon using the username london Still not working!! I get: Listening on authentication address * port 1812 Listening on accounting address * port 1813 Listening on command file /var/run/radiusd/radiusd.sock Listening on proxy address * port 1814 Ready to process requests. rad_recv: Access-Request packet from host 192.168.2.253 port 4981, id=41, length=222 Acct-Session-Id = "1096" NAS-IP-Address = 192.168.2.253 Service-Type = Framed-User Framed-Protocol = PPP NAS-Port = 0 MS-RAS-Vendor = 311 MS-RAS-Version = "MSRASV5.20" NAS-Port-Type = Virtual Tunnel-Type:0 = PPTP Tunnel-Medium-Type:0 = IPv4 Calling-Station-Id = "10.10.108.136" Tunnel-Client-Endpoint:0 = "10.10.108.136" MS-RAS-Client-Version = "MSRASV5.10" MS-RAS-Client-Name = "MSRAS-0-CRIS_D620_LAPTO" User-Name = "london" CHAP-Challenge = 7006be2aedd9dca01 CHAP-Password = 2f9fea3082b5bae5fb +- entering group authorize {...} [preprocess] expand: %{User-Name} -> london ++[preprocess] returns ok [chap] Setting 'Auth-Type := CHAP' ++[chap] returns ok ++[mschap] returns noop rlm_sql (sql): Reserving sql socket id: 3 [sql] expand: SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radcheck WHERE username = '' ORDER BY id [sql] expand: SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT groupname FROM radusergroup WHERE username = '' ORDER BY priority rlm_sql (sql): Released sql socket id: 3 [sql] User not found ++[sql] returns notfound ++[expiration] returns noop ++[logintime] returns noop [pap] WARNING! No "known good" password found for the user. Authentication may fail because of this. ++[pap] returns noop Found Auth-Type = CHAP +- entering group CHAP {...} [chap] login attempt by "london" with CHAP password [chap] Cleartext-Password is required for authentication ++[chap] returns invalid Failed to authenticate the user. Using Post-Auth-Type Reject +- entering group REJECT {...} [attr_filter.access_reject] expand: %{User-Name} -> london attr_filter: Matched entry DEFAULT at line 11 ++[attr_filter.access_reject] returns updated Delaying reject of request 0 for 1 seconds Going to the next request Waking up in 0.9 seconds. Sending delayed reject for request 0 Sending Access-Reject of id 41 to 192.168.2.253 port 4981 Waking up in 4.9 seconds. Cleaning up request 0 ID 41 with timestamp +3 Ready to process requests. _________________________________________________________________ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/