《操作系统安全:samba匿名访问配置(实验二).docx》由会员分享,可在线阅读,更多相关《操作系统安全:samba匿名访问配置(实验二).docx(2页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、实验二:Samba匿名访问配置一、实验目的1、掌握Samba匿名访问控制配置2、掌握访问Samba服务器的共享文件二、实验内容与步骤Samba匿名访问控制配置公共匿名类共享目录的配置(即匿名账户访问共享目录或文件)# vim /etc/samba/smb. conf#设置smb. conf配置文件rootglocalhost vim /etc/samba/smb. conf|图5:设置smb. conf配置文件globalworkgroup = WORKGROUP#设置主机工作组server string = Samba Server Version %v#samba服务注释workgroup
2、 = MYGROUPserver string = Samba Server Version %vlog level = 1#设置日志文件安全级别为1log file = /var/log/samba/%m#设置H志文件名称,如以IP地址为名称max log size = 50#设置日志文件最大容量50KB, 0表示不限制# logs split per machinelog level=l|log file = /var/log/samba/log.# max 50KB per log file, then rotatemax log size = 50security = share#以5
3、卜6验证方式访问passdb backend = tdbsam#定义用户后台类型security = share|passdb backend = tdbsamload printers = no#关闭打印共享功能cups options = raw#打印机选项load printers = no|cups options = rawusersharecomment = Home Directories#共享文件描述path = /home/shareuser#共享路径browseable = yes#共享文件可以浏览writable = yes#共享文件可写;read only = yes#
4、共享文件可读,不能与writable共用guest ok = yes#允许guest用户访问comment = Home Directories path = /home/shareuser browseable = yes writable = yes quest ok = yes# /etc/ini t. d/smb restart#重启samba服务、 .dy J % centOS系统测试:# yum -y install samba-client #在线安装samba-client才能使用smbclient命令 # smbclicnt /127. 0. 0. 1/sharc/homc/sharcuserWARNING: The security二share option is deprecatedEnter root, s password:由于匿名访问不需要密码,可直接回车即可smb: q 退出访问rootlocal.host T# smbclient /127. 0. 0. 1/home/shareuser WARNING: The security:share option is deprecated Enter roots password:图8: ccntOS系统测试2)、windows系统下的共享访问172. 172. 0. 10homeshareuser