{"id":2109,"date":"2017-04-12T11:44:19","date_gmt":"2017-04-12T11:44:19","guid":{"rendered":"http:\/\/galhano.com\/blog\/?p=2109"},"modified":"2017-04-13T08:42:37","modified_gmt":"2017-04-13T08:42:37","slug":"windows-domain-and-ntp-servers","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=2109","title":{"rendered":"Windows Domain and NTP Servers"},"content":{"rendered":"<h3><span style=\"color: #008000;\">Find your PDC Emulator<\/span><\/h3>\n<p>[ps]Get-ADDomainController -Discover -Service PrimaryDC[\/ps]<\/p>\n<h3><span style=\"color: #008000;\">Transfer domain roles if needed<\/span><\/h3>\n<p><a href=\"https:\/\/technet.microsoft.com\/pt-pt\/library\/cc816944(v=ws.10).aspx\">https:\/\/technet.microsoft.com\/pt-pt\/library\/cc816944(v=ws.10).aspx<\/a><\/p>\n<h3><span style=\"color: #008000;\">ntp Servers Pt<\/span><\/h3>\n<p><a href=\"http:\/\/www.pool.ntp.org\/zone\/pt\">http:\/\/www.pool.ntp.org\/zone\/pt<\/a><br \/>\npool.ntp.org<\/p>\n<h3><span style=\"color: #008000;\">Set NTP<\/span><\/h3>\n<p><a href=\"https:\/\/blogs.technet.microsoft.com\/nepapfe\/2013\/03\/01\/its-simple-time-configuration-in-active-directory\/\">https:\/\/blogs.technet.microsoft.com\/nepapfe\/2013\/03\/01\/its-simple-time-configuration-in-active-directory\/<\/a><\/p>\n<p><strong>Using w32tm.exe<\/strong><\/p>\n<p>Run the following command on the PDC emulator:<\/p>\n<p>[ps]w32tm \/config \/manualpeerlist:timeserver \/syncfromflags:manual \/reliable:yes \/update[\/ps]<\/p>\n<p>(where timeserver is a \u2013space delimited\u2013 list of your time source servers)<\/p>\n<p>Once done, restart W32Time service.<\/p>\n<p>[ps]net stop w32time[\/ps]<\/p>\n<p>[ps]net start w32time[\/ps]<\/p>\n<p>Run the following command on all other DCs (that are not PDC):<\/p>\n<p>[ps]w32tm \/config \/syncfromflags:domhier \/update[\/ps]<\/p>\n<p>Once done, restart W32Time service.<\/p>\n<h3><strong>FIND DC&#8217;servers<\/strong><\/h3>\n<p>[ps]PS   nltest \/dclist:mydomain.local[\/ps]<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #800000;\"><strong>Configurar o NTP no Linux<\/strong><\/span><\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"tcTTqPEPyt\"><p><a href=\"https:\/\/pplware.sapo.pt\/linux\/ntp-sincronize-o-relogio-do-seu-linux\/\">NTP &#8211; Sincronize o rel\u00f3gio do seu Linux<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;NTP &#8211; Sincronize o rel\u00f3gio do seu Linux&#8221; &#8212; Pplware\" src=\"https:\/\/pplware.sapo.pt\/linux\/ntp-sincronize-o-relogio-do-seu-linux\/embed\/#?secret=3qukdRB10P#?secret=tcTTqPEPyt\" data-secret=\"tcTTqPEPyt\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>1- Vamos come\u00e7ar por instalar o ntp<\/p>\n<p>[ps]yum install ntp[\/ps]<\/p>\n<p>2- Agora activamos o servi\u00e7o<\/p>\n<p>[ps]chkconfig ntpd on[\/ps]<\/p>\n<p>Indica\u00e7\u00e3o do servidor a usar para sincronizar o nosso rel\u00f3gio. Para esse vou usar um dos disponibilizados pelo Observat\u00f3rio Astron\u00f3mico de Lisboa<\/p>\n<p>[ps]ntpdate ntp02.oal.ul.pt[\/ps]<\/p>\n<p>Nota: O Observat\u00f3rio Astron\u00f3mico de Lisboa disponibiliza 2 servidores para configura\u00e7\u00e3o dos rel\u00f3gios. Quem pretender usar os dois deve editar o ficheiro \/etc\/ntp.conf e incluir a seguinte informa\u00e7\u00e3o:<\/p>\n<p>[ps]server ntp02.oal.ul.pt[\/ps]<\/p>\n<p>[ps]server ntp04.oal.ul.pt[\/ps]<\/p>\n<p>3- Iniciar o servi\u00e7o do ntpd<\/p>\n<p>[ps]\/etc\/init.d\/ntpd start&amp;nbsp;[\/ps]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find your PDC Emulator [ps]Get-ADDomainController -Discover -Service PrimaryDC[\/ps] Transfer domain roles if needed https:\/\/technet.microsoft.com\/pt-pt\/library\/cc816944(v=ws.10).aspx ntp Servers Pt http:\/\/www.pool.ntp.org\/zone\/pt pool.ntp.org Set NTP https:\/\/blogs.technet.microsoft.com\/nepapfe\/2013\/03\/01\/its-simple-time-configuration-in-active-directory\/ Using w32tm.exe Run the following command on the PDC emulator: [ps]w32tm \/config \/manualpeerlist:timeserver \/syncfromflags:manual \/reliable:yes \/update[\/ps] (where timeserver is a \u2013space delimited\u2013 list of your time source servers) Once done, restart W32Time service. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,6,214],"tags":[],"class_list":["post-2109","post","type-post","status-publish","format-standard","hentry","category-code-snippets","category-networking","category-ntp","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2109"}],"version-history":[{"count":9,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2109\/revisions"}],"predecessor-version":[{"id":2123,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2109\/revisions\/2123"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2109"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}