Thursday, June 14, 2012

samba in ubuntu

介紹如何在 ubuntu 上架 samba
1) 先安裝 samba
> sudo apt-get install samba

2) 改 /etc/samba/smb.conf, 加入想要分享的資料夾

[sda1]
path=/tmp/sda1
browseable = yes
read only = no
;writable = yes
;guest ok = yes
create mask = 0755
directory mask = 0755

[sda5]
path=/tmp/sda5
browseable = yes
read only = no
;writable = yes
;guest ok = yes
create mask = 0755
directory mask = 0755

[sda6]
path=/tmp/sda6
browseable = yes
read only = no
;writable = yes
;guest ok = yes
create mask = 0755
directory mask = 0755

[sdb1]
path=/tmp/sdb1
browseable = yes
read only = no
;writable = yes
;guest ok = yes
create mask = 0755
directory mask = 0755

[sdb2]
path=/tmp/sdb2
browseable = yes
read only = no
;writable = yes
;guest ok = yes
create mask = 0755
directory mask = 0755

3) 加入使用者帳號, 前提該帳號必須已經存在
smbpasswd -a some_user_account



No comments: