当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux 网管 123 --- 第7章. 自订的组态及管理内容 -4.使用 Samba

Unix/Linux
linux查看内存的大小
在linux下写的代码,用的是utf-8,结果拿到XP下运行的时候,所有的中文都成乱码
linux su和sudo命令的区别
linux cron 下的定时执行工具使用技巧
linux 查找进程及终止进程操作的相关命令
redhat linux 安装 gcc编译器
Linux Mplayer播放各种格式的电影
一起回顾一下linux常用命令
Linux 网站项目发布要做哪些配置
linux SSH配合SecureCRT的密匙完美使用方法
GD 编译出错解决方法
Facebook Open Platform编译FAQ
Linux 系统硬盘 优化
linux 挂载详解
linux crontab定时命令
Linux 系统中确保访问三级域名畅通的方法
Linux 特权帐号VS普通帐号
确保Linux系统安全的前提条件 漏洞防护
Linux 监视系统资源使用率
Red Hat Linux上使用BIND建立DNS服务器

Unix/Linux 中的 Linux 网管 123 --- 第7章. 自订的组态及管理内容 -4.使用 Samba


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 44 ::
收藏到网摘: n/a

  使用 Samba 进行 Windows型态的档案及列印服务

Linux可以使用 Samba 套件提供 SMB 服务 (例如. WfW, Win95,及 NT型态的网路档案及列印分享)。
这一节会描述如何组态分享,以及如何从客户端存取这些服务。 
 Samba 套件包含在 Red Hat 发行版中,您可以检查是否安装以及其版本,键入: 
  rpm -q samba
 


如果尚未安装,您需要使用 RPM 公用程式安装它。 查看 第10章,使用 Red Hat 套件管理程式 (RPM) 
一节 有关如何做的细节。 

这些 Samba 档中您应该关心的最重要部分是: 

/etc/smb.conf 

Samba 组态档是分享及其他组态参数的设定 (查看下面) 
  
/var/log/samba/ 

放 Samba log 档的地方 
  
/home/samba/ 

建议应该设定的档案分享位置。 然而, 您应该选择一个符合足够您存放档案空间的地方。个人来说,
我常设定一个大的 partition 挂载在 /archive/  下并且放我的分享档案。
 ``/etc/smb.conf'' 档包含了档案及列印分享的组态资讯。档案的开头几行包含了整体的组态方针,所
 有的分享都相同 (除非他们超越了每一个独立分享的基础),其馀的是分享部分。 
Samba 安装包括了一个预设的 smb.conf 档,可以满足您大多数的需求,且只需作稍微的修改。 

这是这个档的 一些例 (我会大幅地自订它给您看看更多重要及有趣的部分): 
  # Items common to all shares (unless over-ridden on a per-share basis)
[global]
   # Number of minutes of inactivity before client is disconnected
   # to avoid consuming resources.  Most clients will automatically
   # reconnect so this is a good idea to enable.
   dead time = 10

   # Don't let users connect as “root”, just-in-case.  :-)
   invalid users = root

   # Specify the account for guest shares (shares that don't require
   # a password to connect to.  This username must be a valid user
   # in the /etc/passwd file.
   guest account = guest

   # Specify where log files should be written to.  The “%m” suffix
   # means that log files will be created in the format
   # log.machine-name (eg. “log.twixel”)
   log file = /usr/local/samba/logs/log.%m

   # Maximum size of log file, in Kilobytes.
   max log size = 1000

   # Password level 3 means that case is not an issue when entering
   # passwords.  A little less secure than level 1 or 2 would be,
   # but seems to be a fair compromise for user convenience.
   password level = 3

   # Specify that all shares should appear in the browse list
   # (override any you don't want on a per-share basis).
   browseable =&