<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Hi,<br></div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>here the option without read the informaton on the database (it's working but duplicated information)</div><div><br></div><div><Realm <a href="http://example.com" target="_blank">example.com</a>><br></div><div><div> AuthByPolicy ContinueWhileAccept</div><div><br></div><div><span style="white-space:pre-wrap"> </span># Rewrite email to username</div><div> RewriteUsername s/^([^@]+)/username1/</div><div> RewriteUsername s/^([^@]+)/username2/</div><div> RewriteUsername s/^([^@]+)/username3/</div><div> RewriteUsername s/^([^@]+)/username4/</div><div><br></div><div> AuthBy RadiusProxy</div><div></Realm></div></div><div><br></div><div>Option 1 with Database (NOT OK, need to set a fariable)</div><div><br></div><div><div><AuthBy GROUP></div><div> Identifier ReplaceUser</div><div> AuthByPolicy ContinueWhileAccept</div><div> <AuthBy SQL></div><div><br></div><div> DBSource dbi:mysql:%{GlobalVar:DBname}<br></div><div> DBUsername %{GlobalVar:DBuser}</div><div> DBAuth %{GlobalVar:DBpass}</div><div> AuthSelect select USERNAME \<br></div><div> from CONTACT \</div><div> where EMAIL='%n'</div><div> AuthColumnDef 0, My-User, reply<br></div><div><br></div><div> </AuthBy></div><div><br></div><div> <AuthBy GROUP></div><div><br></div><div> # Email to Username</div><div> RewriteUsername s/^([^@]+)/$myuser/ # variable not set !!</div><div> <AuthBy RADIUS><br></div><div><br></div><div> Host 192.168.1.50</div><div> Host 192.168.100.50</div><div> Secret xxxxx</div><div> AuthPort 1812</div><div><br></div><div> </AuthBy></div><div><br></div><div> </AuthBy></div><div><br></div><div></AuthBy></div><div><br></div><div><Realm <a href="http://example.com" target="_blank">example.com</a>></div><div><br></div><div> AuthByPolicy ContinueWhileAccept</div><div> #Translate all uppercase to lowercase<br></div><div> RewriteUsername tr/A-Z/a-z/</div><div> AuthBy ReplaceUser<br></div><div><br></div><div></Realm></div></div><div><br></div><div>regards</div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 12 mar 2019 alle ore 14:18 Heikki Vatiainen <<a href="mailto:hvn@open.com.au" target="_blank">hvn@open.com.au</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/03/2019 23.00, Gianlu Bol wrote:<br>
<br>
> Are there any examples with PostAuthSelectHook?<br>
<br>
I think the refrence manual has currently the only example specific to <br>
PostAuthSelectHook. You could see other hooks, for example, <br>
goodies/hooks.txt for more examples.<br>
<br>
One option could be to use paid support list if you are hesitant to post <br>
more details on this public list.<br>
<br>
Thanks,<br>
Heikki<br>
<br>
-- <br>
Heikki Vatiainen <<a href="mailto:hvn@open.com.au" target="_blank">hvn@open.com.au</a>><br>
<br>
Radiator: the most portable, flexible and configurable RADIUS server<br>
anywhere. SQL, proxy, DBM, files, LDAP, TACACS+, PAM, Active Directory,<br>
EAP, TLS, TTLS, PEAP, WiMAX, RSA, Vasco, Yubikey, HOTP, TOTP,<br>
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, etc.<br>
_______________________________________________<br>
radiator mailing list<br>
<a href="mailto:radiator@lists.open.com.au" target="_blank">radiator@lists.open.com.au</a><br>
<a href="https://lists.open.com.au/mailman/listinfo/radiator" rel="noreferrer" target="_blank">https://lists.open.com.au/mailman/listinfo/radiator</a><br>
</blockquote></div>
</div></div>