分类: LINUX
2011-12-19 16:30:14
[global]
workgroup = workgroup
netbios name = smb
server string = smb.com
security = user
#hosts allow = 127. x.x.x.x
wins support = yes(是yes,否则访问不了windows机器)
#======================= Share Definitions
=======================
[legenddownload] 和下面legendupload名字不能相同,否则只能访问一个目录
comment = legendshare
path =
/home/bachit/Desktop/downloads
browseable = yes
# writeable = no
# available = yes
read only = yes
# By default, the home directories are exported read-only. Change
the
# next parameter to 'no' if you want to be able to write to
them.
# File creation mask is set to 0700 for security reasons. If you
want to
# create files with group=rw permissions, set next parameter to
0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If
you want to
# create dirs. with group=rw permissions, set next parameter to
0775.
directory mask = 0700
# By default, \\server\username shares can be connected to by
anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can
connect
# to \\server\username
# This might need tweaking when using external authentication
schemes
valid users = bachit
:加入用户名,否则不能访问
##################
[legendupload]和上面legenddownload名字不能相同,否则只能访问一个目录
comment = legendshare
path =
/home/bachit/Desktop/uploads
browseable = yes
writeable = yes
available = yes
# read only = yes
# By default, the home directories are exported read-only. Change
the
# next parameter to 'no' if you want to be able to write to
them.
# File creation mask is set to 0700 for security reasons. If you
want to
# create files with group=rw permissions, set next parameter to
0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If
you want to
# create dirs. with group=rw permissions, set next parameter to
0775.
directory mask = 0700
# By default, \\server\username shares can be connected to by
anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can
connect
# to \\server\username
# This might need tweaking when using external authentication
schemes
valid users = bachit
:加入用户名,否则不能访问
###########
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = no
writeable = no
printable = yes
把当前系统存在的用户名加入到samba:smbpasswd -a username; 提示输入密码。
smbpasswd -x XXX (delete user)