samba
简介
Samba是在Linux系统上实现SMB(Session MessageBlock)协议的一个免费软件,以实现文件共享和打印机服务共享
安装
yum -y install samba
配置
cat /etc/samba/smb.conf | egrep -v "^#|^$"
[global]
# 指定samba服务器所在的SMB工作组
workgroup = WORKGROUP
# 设置samba的安全模式为用户级认证
security = user
netbios name=smbserver
# 指定samba服务器监听的网络接口
interfaces=em1
# 指定密码数据库后端,默认值
passdb backend = tdbsam
max connections = 0
log file = /var/log/samba/log.%m
max log size =0
deadtime = 0
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[kf]
comment=server is kf-samba
# 指定共享目录的本地路径
path=/mnt/rhd/
# 指定具有写入权限的用户列表
write list=xiao @kkkk
create mask = 0664
directory mask = 0775
# 允许浏览此共享
browseable =yes
writable = yes
# 允许共享被访问
available = yes
# 允许匿名用户访问此共享
public = yes
guest ok = yes
writable = yes
# 指定允许访问此共享的用户列表
valid users = xiao,@kkkk
启动
systemctl enable smb.service --now
添加用户
useradd xiao # 创建用户
smbpasswd -a xiao # 设置密码
登录
\\smbIP
标签:samba,log,xiao,指定,yes,共享
From: https://www.cnblogs.com/kkit/p/18331590