Difference between revisions of "Samba (正體中文)"

From ArchWiki
Jump to: navigation, search
(rm temporary i18n template)
m (Update category.)
Line 1: Line 1:
 
[[Category:正體中文]]
 
[[Category:正體中文]]
[[Category:HOWTOs (正體中文)]]
+
[[Category:File systems (正體中文)]]
 +
[[Category:Networking (正體中文)]]
 
[[cs:Samba]]
 
[[cs:Samba]]
 
[[da:Samba]]
 
[[da:Samba]]

Revision as of 11:39, 4 January 2014

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Samba (正體中文)#)

安裝samba服務可以與Windows進行文件的共享
下面是在Arch下的簡單安裝方法:
- pacman -S samba
- (root) cp /etc/samba/smb.conf.default /etc/samba/smb.conf
- (root) vim /etc/samba/smb.conf (或者使用其他的編輯器)

[globle]選項塊
workgroup = HOME # 組名,在Windows中默認是MSHOME或者WORKGROUP
netbios name = ZelluX # 在網上鄰居中顯示的機器名
encrypt passwords = yes # 應該設為yes。但是如果要在Windows 98/95上訪問你的服務器,得把這個設為no,因為它們不支持密碼的加密傳輸。

[homes]選項塊
最簡單的配置(登陸後方可訪問):
browseable = no
read only = no # 或者writable = yes

匿名可讀,登陸後可以修改:
public = yes
writable = yes
write list = @staff

如果想讓Windows用戶看到一個清晰的目錄(隱藏.開頭的文件,比如~/.bashrc):
[homes]
path = /home/%u/smb
browseable = no
read only = no
同時要在每位用戶的主目錄下建立一個smb目錄。可以通過在/etc/skel目錄下建立smb,從而自動在所有用戶目錄下建立該目錄
mkdir /etc/skel/smb

要共享其他的目錄也很容易,衹要設置path和valid users屬性即可
[music]
path = /mnt/windows/Music/
browseable = yes
read only = yes
valid users = Bryan, Michael, David, Jane
valid users屬性指定登陸後有權限訪問到這個目錄的用戶

- (root) 使用 smbpasswd -a 用戶名 增加允許登陸的用戶,並指定他們的登陸密碼
- (root) /etc/rc.d/samba stop 停止samba服務
- (root) /etc/rc.d/samba start 啟動samba服務