Chinaunix首页 | 论坛 | 博客
  • 博客访问: 588510
  • 博文数量: 187
  • 博客积分: 10025
  • 博客等级: 上将
  • 技术积分: 2990
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-18 17:40
文章分类

全部博文(187)

文章存档

2010年(1)

2009年(23)

2008年(163)

我的朋友

分类: LINUX

2008-07-02 14:29:35

samba配置笔记
samba服务器,每个用户都能登陆到自己所属的文件夹下,public文件夹为公共文件,所有用户都可访问。没有配置打印共享(没有打印机)。
 
 
一、首先要安装,我用的是fc4自带的安装,很容易。
二、主要是配置,以下是我的smb.conf (路径:/etc/samba/smb.conf)
    
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
# workgroup = NT-Domain-Name or Workgroup-Name
  workgroup = Workgroup
# server string is the equivalent of the NT Description field
  server string = This is feel's samba Server
  log file = /var/log/samba/%m.log
  max log size = 50
  security = user
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  dns proxy = no

#============================ Share Definitions ==============================
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   winbind use default domain = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   valid users=%S
   create mode=0664
   directory mode=0775
[public]
   comment = Public Stuff
   path = /home/public
   public = yes
   read only = yes
   writable= yes
   valid
 
将配置文件配好后使用service smb start启动服务即可。
在使用前记得添加samba用户,使用smbpasswd -a xxx 即可, xxx为linux的用户。并将xxx用户添加到组users里去,命令为usermod -G users xxx。
如果不能正确登陆或没有读写权限不对,检查/home/public的权限,使用chown和chgrp修改至适合。
阅读(445) | 评论(0) | 转发(0) |
0

上一篇:nfs配置方法

下一篇:Linux VNC Server

给主人留下些什么吧!~~