Re: add a realm to a User-Name if no realm
Alan DeKok said: > "Lewis Bergman" <[EMAIL PROTECTED]> wrote: >> I was hoping to look for a specific %{NAS-Identifier} and based on that >> AND the fact that a user does not have an "@" in the username, add the >> realm. > > Try using "hints" > > DEFAULT User-Name !~ ".*@", NAS-Identifier == "foo" > User-Name := "[EMAIL PROTECTED]" You, my friend, are wonderful. Please tell me how I might be able to show my gratitude. -- Lewis Bergman Texas Communications 4309 Maple ST. Abilene, TX 79602 325-691-3301 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: add a realm to a User-Name if no realm
"Lewis Bergman" <[EMAIL PROTECTED]> wrote: > I was hoping to look for a specific %{NAS-Identifier} and based on that > AND the fact that a user does not have an "@" in the username, add the > realm. Try using "hints" DEFAULT User-Name !~ ".*@", NAS-Identifier == "foo" User-Name := "[EMAIL PROTECTED]" Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: add a realm to a User-Name if no realm
Lewis Bergman wrote: I wasn't quite specific enough on my post. The NULL match in the realm module would probably work for the "no realm at all" situation. I was hoping to look for a specific %{NAS-Identifier} and based on that AND the fact that a user does not have an "@" in the username, add the realm. I did something a bit similar, we are operating the NAS for another ISP that doesn't use the realm in their usernames. I put this in the users file to force it to be proxied: DEFAULT Called-Station-Id == "515XXX", Proxy-To-Realm := "otherisp" You should be able to do something similar. dave - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: add a realm to a User-Name if no realm
I wasn't quite specific enough on my post. The NULL match in the realm module would probably work for the "no realm at all" situation. I was hoping to look for a specific %{NAS-Identifier} and based on that AND the fact that a user does not have an "@" in the username, add the realm. -- Lewis Bergman Texas Communications 4309 Maple ST. Abilene, TX 79602 325-691-3301 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
add a realm to a User-Name if no realm
I am in need of rewriting a username in a request to include a domain. Basically, if a user comes in as "user" add the realm "@dom.com" so it is checked as "[EMAIL PROTECTED]". I found this in the archives which seems to be close. http://www.mail-archive.com/freeradius-users@lists.freeradius.org/msg15228.html I presume the solution above would go in the users file. I need to be able to do this differently per client. Is this possible? So I added DEFAULT User-Name !~ "@", User-Name := "[EMAIL PROTECTED]" but that fails to yeild the result I was looking for. I see from the debug that it is matched users: Matched entry DEFAULT at line 223 But that user isn't in the users file, they are all in MySQL. As a result, do I need that in the sql.conf or one of the preprocess files? I did add the user to the user file but authentication still failed. I have also studied variables.txt but seem unable to make this work. I even tried making my own preprocess file. I didn't expect it to work and I wasn't dissappointed. Any help appreciated. -- Lewis Bergman Texas Communications 4309 Maple ST. Abilene, TX 79602 325-691-3301 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html