大网数据广告活动
服务器运维问答

Unable to connect to SQL Server from RHEL Server 7.4 using Kerberos

· 52CE 我爱测

So I'm trying to connect to one of our SQL server from a RHEL Server 7.4 machine, I already installed kerberos, unixodbc and Microsoft ODBC for Linux. The SQL Server I'm trying to connect to is inside Active Directory domain, I w…

问题原文

原帖链接 · chad · CC BY-SA 3.0

So I'm trying to connect to one of our SQL server from a RHEL Server 7.4 machine, I already installed kerberos, unixodbc and Microsoft ODBC for Linux.

The SQL Server I'm trying to connect to is inside Active Directory domain, I was able to authenticate through that using kinit but still getting SSPI Provider: Server not found in Kerberos database. error.

This is my snippet from terminal:

[RH@localhost /]$ sudo kinit [email omitted]
[sudo] password for RH: 
Password for [email omitted]: 
[RH@localhost /]$ sqlcmd -E -S MyServer
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : SSPI Provider: Server not found in Kerberos database.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Cannot generate SSPI context.

This is my /etc/krb5.conf:

[libdefaults]
 dns_lookup_realm = false
 ticket_lifetime = 24h
 forwardable = yes
 default_realm = ADS.LOCAL.COM
 default_ccache_name = KEYRING:persistent:%{uid}
 dns_lookup_kdc = true

[domain_realm]
 .ads.local.com = ADS.LOCAL.COM

Thanks in advance!

已采纳解答

原帖链接 · TuxOne · CC BY-SA 3.0

what did you get from

klist -k

executed as root? If there is nothing to see, then your server is not joined to the active directory. Otherwise you see your host entries for the kerberos system.

Normally, RHEL 7 Systems are configured with sssd as the central authentication service. Please check if sssd is installed and running:

systemctl status sssd

If not, you can try to join again with

net ads join

Otherwise, configure your sssd to join your active directory domain with

realm join

You can get more Information about this here:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/windows_integration_guide/SSSD-AD

Regards, Björn

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。