#1
  1. Daniel Schildsky
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2004
    Location
    KL, Malaysia.
    Posts
    1,553
    Rep Power
    1621

    Querying time from a Windows domain controller


    Hi all, I have a setup with 1 Debian server as application server, and being connected to a corporate LAN. The LAN has a windows box as the domain controller.

    I have a need for a time synchronisation mechanism to be installed at the Debian box to keep the applications in that server run correctly (they are time-critical). At first I tried to install NTP utility tool for synchronisation, but found that that company's firewall blocks port 123 for UDP and TCP, while applying to the corporate system administrator to open port 123 would take long. I need an alternative way to query the time from a windows domain controller and reset the clock at the Debian server.

    Is there any ways which I could query the domain controller (Windows server) for time from a Debian server and reset the time on the Debian server?
    When the programming world turns decent, the real world will turn upside down.
  2. #2
  3. Providing fuel for space ships
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2004
    Location
    nr Edinburgh, Scotland
    Posts
    14,382
    Rep Power
    3848
    Is the Windows DC running NTP ?

    If so, you could try modifying '/etc/ntp.conf' on your machine to point to the Windows DC, such as 'server dc1.windows.server.com' and then restart your ntp service.

    You might also want to add it to '/etc/ntp/step-kickers' (i'm running CentOS, not sure about locaiton in Debian), this way if you reboot your box, it should sync on startup.
    The No Ma'am commandments:

    1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
    2.) It is wrong to be French
    3.) It is O.K. to put all bad people in a giant meat grinder
    4.) Lawyers, see rule 3
    5.) It is O.K. to drive a gas guzzler if it helps you get babes
    6.) Everyone should car pool but me
    7.) Bring back the word 'stewardesses'
    8.) Synchronized swimming is not a sport
    9.) Mud wrestling is a sport
  4. #3
  5. Daniel Schildsky
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2004
    Location
    KL, Malaysia.
    Posts
    1,553
    Rep Power
    1621

    Corporate Policy Constraints limited available solutions


    Unfortunately, I have no current information on whether the windows domain controller has NTP installed due to very stringent operating procedures and operation protocols. To acquire such information may take a few weeks. Rather to go through the tedious, time consuming corporate bureaucracy just to get that piece of information, I would want to try other workarounds.

    Is there a way a *NiX based server can query the time from a Windows server with DOS/*NIX commands only and tune its clock to synchronise with the time returned from the query?
    When the programming world turns decent, the real world will turn upside down.
  6. #4
  7. Providing fuel for space ships
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2004
    Location
    nr Edinburgh, Scotland
    Posts
    14,382
    Rep Power
    3848
    You could try using 'rdate' rather than ntp. rdate uses port 37 iirc.
    Code:
    # rdate -s <your-windows-dc>
    If this does work, you'd be better popping this into a cron though to run everyday to keep the time sync'd.

    [edit]Forgot, you'll probably need to install rdate first
    Code:
    # apt-get install rdate
    The No Ma'am commandments:

    1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
    2.) It is wrong to be French
    3.) It is O.K. to put all bad people in a giant meat grinder
    4.) Lawyers, see rule 3
    5.) It is O.K. to drive a gas guzzler if it helps you get babes
    6.) Everyone should car pool but me
    7.) Bring back the word 'stewardesses'
    8.) Synchronized swimming is not a sport
    9.) Mud wrestling is a sport

IMN logo majestic logo threadwatch logo seochat tools logo