2013年1月31日 星期四

設定Windows Server 2008 為NTP時間伺服器 & 客戶端設定

1. Windows NTP設定
設定步驟如下
win server 2008
reference: http://www.dotblogs.com.tw/halladay/archive/2012/05/11/72124.aspx
win xp
http://windgo.pixnet.net/blog/post/22048041-ntp-server-in-winxp

修改
net stop w32timer
net start w32timer

w32tm /config /update

  net start

linux ntpdate 設定


[root@clientlinux ~]# ntpdate [-dv] [NTP IP/hostname]
選項與參數:
-d :進入除錯模式 (debug) ,可以顯示出更多的有效資訊。
-v :有較多訊息的顯示。

[root@clientlinux ~]# ntpdate 192.168.100.254
28 Jul 17:19:33 ntpdate[3432]: step time server 192.168.100.254 offset -2428.396146 sec
# 最後面會顯示微調的時間有多少 (offset),因為鳥哥這部主機時間差很多,所以秒數...

[root@clientlinux ~]# date; hwclock -r
四  7月 28 17:20:27 CST 2011
西元2011年07月28日 (週四) 18時19分26秒  -0.752303 seconds
# 知道鳥哥想要表達什麼嗎?對啊!還得 hwclock -w 寫入 BIOS 時間才行啊!

[root@clientlinux ~]# vim /etc/crontab
# 加入這一行去!
10 5 * * * root (/usr/sbin/ntpdate tock.stdtime.gov.tw && /sbin/hwclock -w) &> /dev/null

2. crontab 設定
crontab -e
可以對外的狀況
*/5 * * * * (/usr/sbin/ntpdate  clock.stdtime.gov.tw && /sbin/hwclock -w) &> /root/timesync.log
公司內部的設定,設定內部架設好的NTP的IP
*/5 * * * * (/usr/sbin/ntpdate 10.1.1.167 && /sbin/hwclock -w) &> /root/timesync.log

每五分鐘校正一次時間

2013年1月10日 星期四

忘記CentOS 密碼的找回方式

1. 可以到機器前
2. 重開機進入grub畫面3. 加入single,結果如下: kernel /vmlinuz-2.6.18-8.el5 single ro root=LABEL=/ rhgb quiet 4. 進入後出現提示符號# 代表成功啦 passwd root 改一下密碼


reference:http://mypaper.pchome.com.tw/joanneandy1479/post/1321478063