LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1082|回复: 4

samba的配置。。。我快疯掉了

[复制链接]
发表于 2006-4-16 23:14:26 | 显示全部楼层 |阅读模式
关于samba配置
#关于share and user 设置........晕!!!!!!!!!
#设为share时多了一个文件家root?????,gre这个文件家是没问题的 ,无论guest account
= nobody or kong or gre
#kong这个文件家有时没权限,有时又能访问????可设置和gre一样的阿????????
#设置成user 时 ,root文件家无论我输入杀用户明密码都没辙?????
其余除料gre 能知接访问外,其余都说没全线 ????
#我是在winxp 能找到samba 服务起,就是访问出问题!!!
#那位帮我看下,不然真得斯掉料
#======================= Global Settings =====================================

[global]
workgroup = guogroup
netbios name = smb-server
server string = samba server
hosts allow = 192.168.1. 192.168.2. 127. 172.16.27.136 172.16.27.219
printcap name = /etc/printcap
load printers = yes
printing = cups
guest account = kong
log file = /var/log/samba/%m.log
max log size = 0

        security = user   
#       password server = *
;       password server = <NT-Server-Name>
;       password level = 8
;       username level = 8
smb passwd file = /etc/samba/smbpasswd
;        ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt
unix password sync = No
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*aut
hentication*tokens*updated*successfully*
pam password change = yes

;        username map = /etc/samba/smbusers
;        include = /etc/samba/smb.conf.%m

obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=819
;        interfaces = 192.168.12.2/24 192.168.13.2/24
interfaces = 172.16.27.219
;        remote browse sync = 192.168.3.25 192.168.5.255
;        remote announce = 192.168.1.255 192.168.2.44
;        local master = no
;        os level = 33
;       domain master = yes
;        preferred master = yes
;   domain logons = yes
;   logon script = %m.bat
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U
;   wins support = yes
;   wins server = w.x.y.z
guest ok = yes
encrypt passwords = yes
username map = /etc/samba/smbusers
dns proxy = no
;  preserve case = no
;  short preserve case = no
;  default case = lower
;  case sensitive = no
#============================ Share Definitions ==============================

[homes]
comment = Home Directories
browseable = no
writeable = 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
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
printable = yes
[gre]
        comment = Gre's Service
guest ok = yes
path = /home/gre
[kong]
        comment = kong's Service
guest ok = yes
path = /home/kong
      
[tmp]
comment = tmp
guest ok = yes
path = /tmp
create mode = 0666

[home]
    guest ok =yes
    path = /home
 楼主| 发表于 2006-4-16 23:17:37 | 显示全部楼层
下图是user时会出现的情形

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-16 23:17:46 | 显示全部楼层
下图是user时会出现的情形
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-16 23:20:18 | 显示全部楼层
第一次来论坛,还望多多赐教!!!3x
回复 支持 反对

使用道具 举报

发表于 2006-4-17 12:39:31 | 显示全部楼层
你还是老老实实的使用缺省的模板配置文件来修正吧,你的配置文件实在是混乱。

出现root文件夹,说明你用的管理员帐户登录的winxp,因为你启用了sambauser映射;
既然要用share级共享,开[homes]共享干什么?

使用user级别,那么多 guest ok =yes 干什么?出现你贴图那个画面,说明有其他winxp用户已经登录smb服务器了,你修正这句配置来查看:
server string = samba server by %u Logining
不出意外,应该会显示 samba server by Administrator Logining

你对samba的权限理解还太少,先看看这篇文章吧:
http://www.ehuilong.com/gugong/gugong/html/samba.php
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表