- 更新源:apt-get update
- 安装samba: apt-get install samba
- 创建共享目录:mkdir /usr/work && chmod -R 777 /usr/work
- 修改samba配置文件,vim /etc/samba/smb.conf,在配置文件最后添加以下内容
[share]comment = Share Stuffpath = /usr/workbrowseable = yespublic = yesguest ok = yessecurity = sharecreate mask = 0777writable = yesdirectory mask = 0777force directory mode = 0777force create mode = 0777
- 设置用户名和密码:useradd share && smbpasswd -a share
- 重启samba服务:service smba restart
- 登陆共享目录:\IPAddressshare