samba安装

安装

sudo apt-get install samba
sudo apt-get install smbclient

启动、关闭、重启

启动Samba服务器只需执行如下命令:
sudo /etc/init.d/samba start
关闭Samba服务器:
sudo /etc/init.d/samba stop

重新启动Samba服务器:
sudo /etc/init.d/samba restart

配置

mkdir /home/myth/share
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak //修改配置文件之前最好做个备份
vim /etc/samba/smb.conf
或者使用 sudo gedit /etc/samba/smb.conf 打开配置文件
将文件中的内容做如下相应修改:
security=user 后面添加:
security=share
在文件结尾添加如下行:
[share]
comment=this is Linux share directory
path=/home/myth/share
public=yes
writable=yes

这样就能以匿名用户访问共享目录share了。

关于Windows下无写权限:chmod -R go+rwx share/

你可能感兴趣的:(samba安装)