apt-get install samba
創(chuàng)建共享文件夾
/samba_share
注意:不能在用戶目錄下創(chuàng)建, 可以在根目錄下創(chuàng)建
chmod a+rwx samba_share
配置 /etc/samba/smb.conf
在末尾添加:
[share]
comment = ShareBySamba
path = /samba_share
public = no
writable = yes
配置用戶
smbpasswd -a xxx
輸入2次密碼
用戶必須是 ubuntu 已有用戶,密碼是ubuntu密碼
激活用戶
smbpasswd -e xxx
重啟smbd 服務(wù)
service restart smbd
在windows上訪問,首次訪問會提問密碼