ubuntu部署Samba服务器

安装Samba

sudo apt-get install samba

创建共享目录

cd ~
mkdir work
chmod 777 work

修改配置文件smb.conf

sudo vi /etc/samba/smb.conf

在文件末尾添加如下内容

[work]
    comment = samba home directory 
    path = /home/fangqi/work/
    public = yes
    browseable = yes
    public = yes
    read only = no
    valid users = fangqi
    create mask = 0777
    directory mask = 0777 
    force user = nobody
    force group = nogroup
    available = yes

系统中必须已有用户fangqi

增加samba用户

sudo smbpasswd -a fangqi

重新启动

sudo service smbd restart

Samba端口

445
137-139
389

你可能感兴趣的:(ubuntu部署Samba服务器)