# See smb.conf.example for a more detailed config file or # read the smb.conf manpage. # Run 'testparm' to verify the config is correct after # you modified it. [global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [xxk_data] comment='信息科专用' path=/home/data public=no writable=yes
https://www.cnblogs.com/yinheyi/p/6269576.html
安装主要采用yum进行
采用阿里的base+epel
yum -y install samba
systemctl enable smb
mkdir -p /home/data
useradd smbuser
pdbedit -a -u smbuser
cd /home/
chown -R smbuser.smbuser data/
vim /etc/samba/smb.conf
[xxk_data]
comment='信息科专用'
path=/home/data
public=no
writable=yes
systemctl restart smb
如果比较卡慢的话请注意
请按照/etc/hosts和/etc/sysconfig/network文件进行修改
查看目录的大小
du -sh *
# add at 18-09-30 解决xp无法访问samba服务的问题
当遇到xp电脑无法打开samba部署的公共盘时
查阅有的资料认为xp不支持高版本的samba服务
为此修改配置文件
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
ntlm auth = yes
修改后的配置文件为:
# See smb.conf.example for a more detailed config file or # read the smb.conf manpage. # Run 'testparm' to verify the config is correct after # you modified it. [global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw ntlm auth = yes [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [xxk_data] comment='信息科专用' path=/home/data public=no writable=yes