用户工具

站点工具


侧边栏

Hi,大家好,我叫尹佳冀。我是一个热爱太极的程序员!

导航

setup_samba_on_ubuntu

Install Samba Server

sudo apt-get install samba

Create User and password

sudo useradd share # the user name is "share"
sudo smbpasswd -a share

Mount Aliyun OSS to the local folder

ossfs xxx data/ -ourl=oss-cn-xxx.aliyuncs.com  -o allow_other

Configure Share Folder

append below configuration to /etc/samba/smb.conf

[share]
available = yes
browseable = yes
path = /home/joybb/share
create mask = 0777
directory mask = 0777
valid users = share
force user = nobody
force group = nogroup
public = yes
writable = yes
available = yes

Start Samba Service

sudo /etc/init.d/smbd restart

Samba服务所使用的端口和协议:

1)Port 137 (UDP) - NetBIOS 名字服务 ; nmbd

2)Port 138 (UDP) - NetBIOS 数据报服务

3)Port 139 (TCP) - 文件和打印共享 ; smbd (基于SMB(Server Message Block)协议,主要在局域网中使用,文件共享协议)

4)Port 389 (TCP) - 用于 LDAP (Active Directory Mode)

5)Port 445 (TCP) - NetBIOS服务在windos 2000及以后版本使用此端口, (Common Internet File System,CIFS,它是SMB协议扩展到Internet后,实现Internet文件共享)

6)Port 901 (TCP) - 用于 SWAT,用于网页管理Samba

setup_samba_on_ubuntu.txt · 最后更改: 2020/07/22 20:56 (外部编辑)