2010年7月16日 星期五

在FreeBSD上掛載smbfs (NAS)

最近,在弄lab的ftp整合計畫。
要將另一台Linux的資料透過samba的方式來掛載到ftp那台FreeBSD上。
以下則是在弄的過程所得到的一些Notes。

首先,我們可以透過以下的指令來察看有提供連線的資料
smbutil view

掛載時則使用
mount_smbfs //[username]@[host]/[service] [mountpoint]

若要加入 /etc/fstab 使開機後自動mount,請先編輯 /etc/nsmb.conf
加入[host:user]的 section,注意! host及section都必須為"大寫",既使平常輸入的是小寫!
然後在該section加入
password=[encrypted_password] (由smbutil crypt算出,Plain Text也可以)

最後,在 /etc/fstab 裡加上:
//[username]@[host]/[service] [mountpoint] smbfs rw,-I=xxx.xxx.xxx.xxx,-N,-u=[uid],-g=[gid] 0 0

要測試是否成功可以用:
mount -a
來觀看結果。

摘自:http://lazyflai.blogspot.com/2006/09/freebsdsmbfs.html

沒有留言:

wibiya widget