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

Registering linux hostnames on windows DNS

· 52CE 我爱测

How do I register DHCP linux client's hostnames in a windows server DNS? I have a small-business mixed network with: DCHP Windows workstations (Example hostname: win1 ) About 10 machines Machines are on the domain, no special con…

问题原文

原帖链接 · Stewart · CC BY-SA 4.0

How do I register DHCP linux client's hostnames in a windows server DNS?

I have a small-business mixed network with:

  • DCHP Windows workstations (Example hostname: win1)
    • About 10 machines
    • Machines are on the domain, no special config.
  • DHCP Linux (Debian stretch) workstations (Example hostname: lin1)
    • About 20 machines
    • Connected to domain with sssd using realm join
    • Can use AD credentials on any machine
    • /etc/nsswitch.conf contains hosts: files dns which I think means that linux clients can import hostnames from the DNS
  • DHCP/DNS server running Windows Server at a static IP

From any machine I can ping win1, but can't ping lin1 which tells us:

  • all machines use the DNS fine (can ping win1)
  • windows hostnames are automatically registered
  • linux hostnames are not automatically registered

Rejected solutions:

  • hosts: We don't have static IPs so I'm not going to manually maintain a master copy of the hosts file and distribute it whenever a new DHCP lease is issued.
  • Adding A records to DNS: Again, I don't want to manually update records when new DHCP leases are issued.
  • avahi: The windows clients can't see the linux ones.

Things I haven't tried:

  • likewise: I'd rather not abandon sssd and reconfigure all 20 machines from scratch like this. But if lw-register-dns would solve the problem and wouldn't conflict with sssd, then that could be a solution. Still find it weird that clients would need to create a cron-job to modify the DNS, I optimally want to limit DNS write-access.
  • winbind, also seems to replace sssd completely. I tried the linked suggestion, but saw no differences after restarting the client's networking service.
  • nmbd. The workstations already use smbclient, do they really need to become full-fledged samba servers too?
  • net ads dns register -P. I'll need to get access to the DNS to enable insecure updates.

已采纳解答

原帖链接 · Stewart · CC BY-SA 4.0

So the final answer was not on the linux-client side at all, but on the DHCP configuration.

On "Windows Server 2016 Standard" I had to do the following to get this working.

  1. Open the "DHCP" desktop app
  2. Select the DNS tab
  3. Expand the node representing your domain
  4. Right click on "IPv4"
  5. Select "Properties" from the context menu
  6. Check "Enable DNS dynamic updates according to the settings below:"
    1. Select "Always dynamically update DNS records"
  7. Check "Dynamically update DNS records for DHCP clients that do not request updates"

The results were not immediate. Rebooting machines did not force the update. I made the change on Friday, and by Wednessday all Linux clients seemed to be listed in the DNS.

I was able to confirm the additions by viewing the "DNS Manager" on the same server.

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

资料来源与适用范围

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

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

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