1. 程式人生 > >linux 配置samba 共享盤服務。

linux 配置samba 共享盤服務。

samba 共享方法

1、安裝samba服務 : apt-get install samba
2、創建一個系統用戶和samba 進行綁定 : useradd testuser,然後為用戶創建一個密碼passwd testuser
3、修改samba服務配置文件 ,在/etc/samba/smb.conf 文件末尾追加如下內容:
[printers]
comment = All Printers
browseable = no
path = /home/pbc/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers

path = /home/pbc/samba
browseable = yes
read only = yes
guest ok = no

[homes]
comment = Home Directories
browseable = yes
read only = no
create mask = 0664
directory mask = 0775
valid users = %S

4、 重啟samba服務:service smbd restart
5、 windows系統掛在磁盤命令: net use /user:pbc \xx.xx.xx.xx\pbc passwd
6、 ok

linux 配置samba 共享盤服務。