這陣子重新安裝了Ubuntu後才發現之前SAMBA設定的備份檔居然被我給殺了....
因為以往在重灌系統時都是直接將SAMBA設定檔拷回去...
在沒有舊設定檔的情況下..
沒有辦法只好再重新設定一次了...
但在瀏灠器輸入"127.0.0.1:901"後居然沒有出現SWAT的登入畫面..
才發現原來Ubuntu預設是沒有安裝SWAT的... 

安裝SWAT:
sudo apt-get install swat xinetd
sudo madedit /etc/xinetd.d/swat 

以往只需將"disable = yes"改為"no"即可...
此時swat檔居然是空白一片... 
這時才想起之前設定SAMBA時的系統是SuSE Linux..
沒想到在Ubuntu下安裝完SWAT後居然還要自己寫SWAT檔的內容...真是ooxx 

swat檔內容:

# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
#              to configure your Samba server. To use SWAT, \
#              connect to port 901 with your favorite web browser.
service swat
{
        port    = 901
        socket_type     = stream
        wait    = no
        # Use only_from if you want to restrict access
        # only_from = localhost
        user    = root
        server  = /usr/sbin/swat
        log_on_failure  += USERID
        disable = no
}
儲存檔案後重新啟動xinetd.d:
sudo /etc/init.d/xinetd restart
SWAT即可正常運作了...
另外Ubuntu的samba-doc預設也是沒有安裝的...
因此在使用SWAT時左方的"Help"連結也都無法正常顯示man page...
安裝samba-doc:
sudo apt-get install samba-doc
此時左方的"Help"連結即可正常顯示man page囉!
參考網址:
Ubuntu Documentation-Swat 
arrow
arrow
    全站熱搜

    小必 發表在 痞客邦 留言(0) 人氣()