安装服务
yum install -y samba
修改文件
vim /etc/samba/smb.conf
#文件尾部加以下内容后,保存退出 client lanman auth = yes lanman auth = Yes client ntlmv2 auth = no #============================ Share Definitions ============================== [homes] comment = Home Directories browseable = no writable = yes [share] comment = User Share path = /home/share browseable = yes create mask = 0664 directory mask = 0775 writeable = yes valid users = share [public] comment = Public path = /home/public public = yes only guest = yes writable = yes
注:share是账号访问权限,public是公共权限
添加用户
#创建服务器账号 useradd -d /home/share -s /sbin/nologin share #设置账号密码 passwd share #添加samba用户,并设置用户密码 pdbedit -a -u share #查看用户 pdbedit -L
重启服务
service smb restart
中断连接
#windows断开smb连接,cmd输入以下命令 net use * /del /y
本文链接:https://jeff.xin/post/107.html
--EOF--
Comments
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。