ubuntu16.04上samba服务器的安装和配置
samba服务器的介绍可以查看鸟哥私房菜服务篇中的文件服务器之二,有详细的介绍,本文只介绍samba的两种安装方式和配置。
解压到目标目录,如/opt
解压之后,进入到source目录,执行以下命令
./configure
make
make install
[global]
workgroup = Linux # 在windows上显示的目录名称
netbios name = test
server string = Linux Samba Server TextServer
Security = share # 安全等级
[Linux]
path = /root # 共享/root目录
writeable = yes # 写的权限
browsable = yes # 查看的权限
guest ok = yes # 访客身份
设置以guest身份登录,无需密码。
sudo apt-get install samba samba-common-bin
将当前用户添加到samba访客中:
sudo smbpasswd -a username
输入两次密码。
命令行输入:
smbd
nmbd
windows连接采用:\ip
linux连接采用:smbclient -L //ip