2012年4月7日 星期六

如何安裝Ubuntu Samba Server

安裝Samba Server
$ sudo apt-get install samba
配置Samba Server
$ sudo vim /etc/samba/smb.conf
修改smb.conf如下:
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = user

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes
並在smb.conf新增下面內容:
[renee]
   comment = Ubuntu Samba Server
   browseable = yes
   path = /home/renee
   read only = no
   guest ok = no
   create mask = 0644
   directory mask = 0755
建立使用者密碼
$ sudo smbpasswd -a renee
New SMB password:
Retry new SMB password:
重新啟動Samba Server
$ sudo /etc/init.d/smbd restart
$ sudo /etc/init.d/nmbd restart
Client連線到Samba Server
以Window 7為例,點擊『電腦』-->『連線網路磁碟機』,
輸入IP與目錄名稱,
輸入Samba帳號密碼,按確定。

沒有留言:

張貼留言