- 论坛徽章:
- 16
|
回复 7# qq532342743
回复 3# qq532342743
多看看官网,http://wiki.freeradius.org/guide/Concepts
它的逻辑设计就是这样的,只要一个认证通过,就直接到了post-auth/accouting部分了,就是一个流水线。
如果你要改变这个流水线,就要加自己的逻辑, 找个文档看看就懂了,如下仅供参考。
# xxx/site-available/default
auenticate {
WINDOWS_AD #我并不知道ad验证叫什么名字,这里只是实例而已。
if ((ok) {
update {
&control:Auth-Type := XXX
# 更改了属性,默认有request/reply/proxy-request/proxy-reply/session-state/control, control就是不发给nas或者radius的,内部流程控制用的。Auty-Type: = XXX ,这个:= 运算符就是如果不存在就add。你根据自己需要改。还有+=, -=运算符。
# 这里就是,你上个方法验证过了,但不给你到post-auth,再走另外一个验证方法。 ok/updated等都是模块返回值
}
notfound information was not found
noop the module did nothing
ok the module succeeded
updated the module updated the request
fail the module failed
reject the module rejected the request
userlock the user was locked out
invalid the configuration was invalid
handled the module has handled the request itself
返回值还有对应的行为
default noop
reject return
fail return
ok continue ( priority 3)
handled return
invalid return
userlock return
notfound continue (priority 1)
noop continue (priority 2)
updated continue (priority 4)
就是改变起常规的验证流程,你可以看到有些是if (ok || updated)这个是什么意思呢,用radtest看一下就懂了。
|
|