Samba – Windows connects via IP address but not hostname

This one stumped me for a while, but it all came down to time.  I was authenticating Windows servers to Samba via Active Directory.  The NTP service was not running on the Samba service and its time was far out of sync with the Active Directory server.

Quickest fix is to update the time on the Samba server, sync the hardware clock, and then start NTP.

  • Shut down the NTP service if it’s running, then run
    • ntpdate -u <AD server IP address>
  • Sync hardware clock to system time
    • hwclock -w
  • Start NTP service
    • /etc/init.d/ntpd start

My problem was that NTPD wasn’t starting at boot so I changed that in chkconfig and all is well.

  • /sbin/chkconfig –levels 35 ntpd on

Active Directory is very sensitive to time fluctuations between servers.  Make sure all of your servers are keeping accurate time and you’ll minimize Samba and Active Directory issues.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s