Loading... 尝鲜换了Ubuntu 18.04 LTS 桌面版,然后开始了部署之路 <!--more--> ## samba的安装: - 更新软件列表: ```Shell sudo apt update sudo apt upgrade ``` - 安装samba服务: ```Shell sudo apt install samba samba-common ``` - 创建分享目录并设置权限: ```Shell sudo mkdir ~/SMB sudo chomd -R 777 ~/SMB ``` - 添加用户: ```Shell sudo smbpasswd -a yelvlab ``` 然后,会要求输入密码,这里这个就是后面访问的账户和密码,我们也可以创建多个账户,分别对应不同的分享目录。 - 修改配置文件: ```Shell sudo vi /etc/samba/smb.conf ``` 我们需要在配置文件后面添加以下内容: ```Conf [share]#分享的名称 comment = share folder browseable = yes path = /home/hulk/SMB #共享路径 create mask = 0777 directory mask = 0777 valid users = yelvlab #可以连接的用户名 force user = nobody force group = nogroup public = yes available = yes writeable = yes ``` - 重启服务以生效: ```Shell sudo service smbd restart ``` 然后我们就可以在例如windows系统里面通过`\\IP Address\share`来访问我们这个ubuntu的samba共享了。 Last modification:September 20, 2018 © Allow specification reprint Like 0 If you think my article is useful to you, please feel free to appreciate