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 users= @users
将配置文件配好后使用service smb start启动服务即可。
在使用前记得添加samba用户,使用smbpasswd -a xxx 即可, xxx为linux的用户。并将xxx用户添加到组users里去,命令为usermod -G users xxx。
如果不能正确登陆或读写权限不对,检查/home/public的权限,使用chown和chgrp修改至适合。
阅读(762) | 评论(0) | 转发(0) |