15

I have several Ubuntu machines (mostly 8.04) that I would like to register their hostnames (or desired hostnames) with my main DNS server running on Windows 2000 so that I can access these machines from any other machine using that DNS server by hostname. Windows clients can do this automatically with the MS client or manually with ipconfig /registerdns. How do I do the equivalent in Linux? I don't necessarily want to register them with the domain using Likewise Open, unless that is the only way to send DNS entries to the Windows server.

These are static IP's. I realize I could add the DNS entries on the Windows side manually as well, but I'm not actually in charge of that Windows DNS server.

jldugger
  • 14,122
  • 19
  • 73
  • 129
bobwood
  • 213
  • 1
  • 2
  • 5

4 Answers4

17

If you want the Linux machines to update DNS themselves, then the DNS zone(s) must be configured for nonsecure dynamic updates. Then if you have the Samba client installed, you can update the record manually like this:

net ads dns register -P

I'm not sure if this command requires you to be on the domain though.

Mike Conigliaro
  • 3,105
  • 2
  • 24
  • 24
  • 3
    This seems promising. I have been getting that stupid "No logon servers" error when attempting this, so I haven't been able to prove that it works. Nonsecure dynamic updates are allowed according to the DNS server admin. I would vote you up, but I don't have the rep yet. – bobwood Jun 05 '09 at 13:06
  • 1
    Problem with this: if an IP address changed, `net ads dns register -P` registers the new IP(s) but does not unregister the old ones. Now, a DNS client may or may not get an old IP address that doesn't work. Find any _automatic_ solution to that? – James Johnston May 16 '16 at 00:05
  • Unfortunately I got the "no logon servers" error with this command even though I was realm joined (CentOS 7). The machine clearly has the ability to update it's own DNS somehow as it jumped to a DHCP scope when I moved it to a new subnet after vmware conversion. – duct_tape_coder Apr 02 '20 at 01:29
5

Have you considered configuring your Windows DHCP server to update DNS entries from the DHCP leases? This could achieve the desired result without any changes on the DNS server or Linux side of things.

Kevin Kuphal
  • 9,064
  • 1
  • 34
  • 41
  • 1
    Sorry, I forgot to put in the question that these are static IP's. I realize I could add the DNS entries on the Windows side manually as well, but I'm not actually in charge of that Windows DNS server. – bobwood Jun 04 '09 at 21:03
  • Why not use DHCP reservation? This will give you the flexibility of a centrally managed IP configuration with the similar result as static IP config. – Mircea Vutcovici Jun 15 '16 at 12:12
4

Sorry, I forgot to put in the question that these are static IP's. I realize I could add the DNS entries on the Windows side manually as well, but I'm not actually in charge of that Windows DNS server.

If you don’t have control of the DNS server, and if the DNS isn’t set up to allow non-secure updates, and it isn't set up to update based on DHCP assignments, and you have a static address, then you are probably out of luck.

Since this system has a static address, is there some reason you can’t just contact the person who runs the DNS server and ask them to add a record for your system?

TRiG
  • 1,167
  • 2
  • 13
  • 30
Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • 2
    Usually that's what I end up doing. I was just curious if there was a way to emulate on Linux what the Client for MS Networks service does on Windows. – bobwood Jun 05 '09 at 13:00
3

This was resolved here using the standard Linux utility nsupdate and initial collaboration from your DNS server administrator.

fcm
  • 398
  • 1
  • 2
  • 12