Linux网络管理之一:samba服务器的快速配置
版权声明:原创作品,谢绝转载!否则将追究法律责任。 |
**********************samba服务器的配置---匿名访问方式********************** ============================================================================ [root@linux-tys root]# cd /etc/samba [root@linux-tys samba]# ls lmhosts secrets.tdb smb.conf smbpasswd smbusers [root@linux-tys samba]# vi smb.conf ##############################-- [global] # workgroup = NT-Domain-Name or Workgroup-Name workgroup = hackbase # server string is the equivalent of the NT Description field server string = rose's Server # if you want to automatically load your printer list rather than setting them up individually then you'll need this printcap name = /etc/printcap load printers = no -----是否允许访问打印机 # It should not be necessary to spell out the print system type unless # yours is non-standard. Currently supported print systems include: # 打印机可选类型:bsd, sysv, plp, lprng, aix, hpux, qnx, cups printing = cups -----CUPS最常用 # Uncomment this if you want a guest account, you must add this to /etc/passwd # otherwise the user "nobody" is used guest account = nobody ----此项默认注释掉,这里我们打开,并改为nobody # this tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/%m.log --- 日志文件位置 # Put a capping on the size of the log files (in Kb). max log size = 0 ----日志的最大大小,0为不限制单位为K # Security mode. Most people will want user level security. See # security_level.txt for details. security = share ----安全等级 ^………………中间只有看到有password的信息,全部注释掉。…… # Most people will find that this option gives better performance. # See speed.txt and the manual pages for details socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 -----此项是TCP/IP会话需要的,要保留 ###################################### [homes] -------定义用户的共享目录,要保留 comment = Home Directories browseable = no writable = yes valid users = %S create mode = 0664 directory mode = 0775 # If you want users samba doesn't recognize to be mapped to a guest user ; map to guest = bad user -######################################### [sharedoc] ------建立的共享 comment = share test path = /home/sharedoc valid users = nobody -----系统不提示用户验证 public = yes writable = yes ====================================================================== [root@linux-tys samba]# service smb restart 客户端通过搜索“网络上的一台计算机”或通过\\172.16.1.1(linux smb server)进行访问 若不能写的话,则可更改sharedoc目录的权限 访问是通过139端口进行的,所以windows客户不能关闭IPC$不能关闭。 ======================================================================= 本文出自 “lgzeng” 博客,谢绝转载! 本文出自 51CTO.COM技术博客 |



lgzeng
博客统计信息
热门文章
最新评论
友情链接
