FreeRADIUS 无法使用 Active Directory 用户登录

FreeRADIUS 无法使用 Active Directory 用户登录

我在 debian 9 中安装了 freeradius 3。我可以使用 radius 中文本文件中的用户登录,但我想使用 Active Directory 中的用户登录。

首先,我安装这个库。

apt 安装 samba winbind krb5-user krb5-config -y

然后我像这样配置领域。

Default Kerberos version 5 realm: XXX.EDU
Kerberos servers for your realm: ad.xxx.local
Administrative server for your Kerberos realm: ad.xxx.local

在文件 /etc/samba/smb.conf 中。我把此代码放在 workgroup = XXX 行下

security = ADS
realm = XXX.EDU
encrypt passwords = yes
client use spnego = yes

idmap config *:backend = tdb
idmap config *:range = 2000-9999
idmap config XXX:backend = ad
idmap config XXX:schema_mode = rfc2307
idmap config XXX:range = 10000-99999

winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users  = yes
winbind enum groups = yes
winbind refresh tickets = Yes

在文件 /etc/krb5.conf 中

[libdefaults]
default_realm = XXX.EDU
dns_lookup_realm = true
dns_lookup_kdc = false
forwardable = true

[realms]
XXX.EDU = {
 kdc = ad.xxx.local
 admin_server = ad.xxx.local
}

[domain_realm]
.xxx.local = XXX.EDU
xxx.local = XXX.EDU

重启服务器后我使用此命令。

net ads join -U Administrator

加入成功。

Joined 'XXX' to dns domain 'xxx.edu'

之后,我使用此命令检查用户,但没有显示任何内容。

wbinfo -u

我使用此命令测试用户登录。

usr/bin/ntlm_auth --domain=XXX [email protected] --password=pass_user_ad

显示这样的错误。我确定我有用户[电子邮件保护]在 AD 中但找不到用户。

NT_STATUS_NO_SUCH_USER: No such user (0xc0000064)

如果我像这样更改域名。

usr/bin/ntlm_auth --domain=XXX.EDU [email protected] --password=pass_user_ad

是显示错误。

NT_STATUS_NO_MEMORY: Memory allocation error (0xc0000017)

如何使用 freeradius 来使用活动目录用户?

答案1

在 /etc/resolve.conf 文件中添加活动目录 ip 作为名称服务器和域广告搜索域名。

相关内容