远程认证与本地认证的优先级
2025/10/29大约 2 分钟
远程认证与本地认证的优先级
配置方法
远程认证与本地认证的优先级由以下命令决定,默认为 disable 状态。
config system global
set admin-restrict-local ? //Enable/disable local admin authentication restriction when remote authenticator is up and running (default = disable).
enable Enable local admin authentication restriction.
disable Disable local admin authentication restriction.
end默认情况(disable)
config system global
set admin-restrict-local diable
end- 如果远程和本地有相同的用户名,不同的密码,则本地认证有效。
- 如果用户名/密码都一样,也是本地认证有效。
- 使用 diagnose debug application fnbamd -1 可以观察到,认证直接在本地完成,不会送到远程服务器上。
修改为 enable
config system global
set admin-restrict-local enable
end- 当任何一个远程认证服务器可达时,远程认证服务器生效,本地认证无效。
- 只有当 FortiGate 到远程认证服务器不可达时,本地认证才有效。
- 如果远程服务器和本地有相同的用户名,认证会先到远程服务器上,但是登录会直接显示失败(无论使用远程用户还是本地用户的密码,无论远程用户和本地用户的密码是否相同)。
重要
在 7.6.0 版本之前,Console 可以使用本地账户登录,不受此功能开启的限制。
多个远程认证服务器的情况(set admin-restrict-local enable)
7.2.0 之前
当 FortiGate 配置了多个远程认证服务器,只配置了一个远程认证服务器与管理员关联,举例:FortiGate 同时配置了 LDAP 与 Radius 服务器,但只有 LDAP 服务器与管理员配置了关联,Radius 服务器没有与任何管理员配置关联:
- 当任何一个远程认证服务器可达时,远程认证服务器生效,本地认证无效。
- 只有当 FortiGate 到所有的远程认证服务器(上述举例为 LDAP、Radius)不可达时,本地认证才有效,即使 Radius 认证服务器没有关联任何管理员。
7.2.0 及之后
当 FortiGate 配置了多个远程认证服务器,只配置了一个远程认证服务器与管理员关联,举例:FortiGate 同时配置了 LDAP 与 Radius 服务器,但只有 LDAP 服务器的用户组与管理员配置了关联,Radius 服务器没有与任何管理员配置关联:
- 只要防火墙管理认证调用的远程认证服务器不可达,本地用户认证就可以生效。
7.6.0 新增选项
config system global
set admin-restrict-local {all | non-console-only | disable}
endnon-console-only:行为与 7.6.0 之前的enable一致(Console 登录不受 admin-restrict-local 影响)。all:行为与 7.6.0 之前的enable一致(Console 登录同样受 admin-restrict-local 影响)。disable:行为与 7.6.0 之前的disable一致。