QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 697|回复: 4

SAMBA的运用问题,请斑竹来侃侃~

[复制链接]
发表于 2004-4-27 13:48:13 | 显示全部楼层 |阅读模式
我现在可以完成的连接有:WIN2KPRO的客户机器可以访问linux里面的资源了,不过WIN2KPRO这个客户机器无法访问一个目录/bak,为何?
先说一下linux上的目录结构,除了基本的目录外,我新建了一个bak目录在/下,权限777。
而在WIN2KPRO访问linux的资源时,就只有这个目录是提示:在windows2000下的网上邻居下找到linux下的sambaserver双击它老显示网络路径找不到?

顺便贴出我的配置文件smb.conf:

[global]
workgroup = redhatlinux
netbios name=samba
server string = samba server
hosts allow = 192.168.1. 192.168.2. 127.

printcap name = /etc/printcap
load printers = yes

printing = cups

; guest account = pcguest
log file = /var/log/samba/%m.log
max log size = 200

; password server =
; password level = 8
; uname level = 8

encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

pam password change = yes

; uname map = /etc/samba/smbusers

; include = /etc/samba/smb.conf.%m
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
; interfaces = 192.168.12.2/24 192.168.13.2/24
; remote browse sync = 192.168.3.25 192.168.5.255
; remote announce = 192.168.1.255 192.168.2.44

local master = yes
; 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 = 192.168.3.184

; wins proxy = yes

security = user
guest ok = yes
guest account = sambaguest
dns proxy = no

; preserve case = no
; short preserve case = no
; default case = lower
; case sensitive = no
[homes]
comment = Home Directories
path = /home/%U
browseable = yes
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0777
; map to guest = bad user

; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no

;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
printable = yes

[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
writable = yes
force create mode = 0777
create mode = 0777
force directory mode = 0777
directory mode = 0777

[cdrom]
comment = CD-ROM
path = /mnt/cdrom
public = yes
writable = no

;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff

;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /home/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes

;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

;[pchome]
; comment = PC Directories
; path = /usr/local/pc/%m
; public = no
; writable = yes

;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no

;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765

[bak]
comment = bak share
path = /bak
guest ok = yes
writeable = yes
public = yes
valid users = sambaguest
force create mode = 0777
create mode = 0777
force directory mode = 0777
directory mode = 0777
 楼主| 发表于 2004-4-27 13:49:10 | 显示全部楼层
实际情况是我的WIN2KPRO可以访问/tmp,/usr/sambaguest,/home这个几个目录,权限也是正确的,权限如上,但是/bak只能看!点击时提示找不到网络路径!为何?我的/BAK是777啦,怎么还是不行?
除非只有/usr,/home,/tmp里面的目录可以共享,/级别的自定义目录不行??
回复

使用道具 举报

 楼主| 发表于 2004-4-27 13:55:26 | 显示全部楼层
还有,如果是LINUX要访问WINDOWS,要如何操作?
我的做法:WINDOWS里面的guest帐户开启,启用wins!linux那边也起用wins(两台机器处于不同子网!)
如果是linux的文本终端,我确实可以使用mount -t smbfs //ip/目录 /mnt/smb来挂载和访问,但是在图形界面要怎么办呢?
是使用smb://192.168.1.123吗?这个只是举例!对吗?我就是这么试的,不过每次总是需要输入帐号,好麻烦啊!而且点到最里面的目录又提示文件访问被拒绝!不明啊!我记得以前在同一子网时很简单就访问成功了,不同子网就这么难!?
回复

使用道具 举报

发表于 2004-4-27 17:13:45 | 显示全部楼层

Re: SAMBA的运用问题,请斑竹来侃侃~

[quote:d403911ac1="岚轩"]
[bak]
comment = bak share
path = /bak
guest ok = yes
writeable = yes
public = yes
valid users = sambaguest
force create mode = 0777
create mode = 0777
force directory mode = 0777
directory mode = 0777[/quote]

valid users = sambaguest 注释掉看看。
回复

使用道具 举报

 楼主| 发表于 2004-4-28 10:29:50 | 显示全部楼层

Re: SAMBA的运用问题,请斑竹来侃侃~

[quote:b484bebaf5="gugong"][quote:b484bebaf5="岚轩"]
[bak]
comment = bak share
path = /bak
guest ok = yes
writeable = yes
public = yes
valid users = sambaguest
force create mode = 0777
create mode = 0777
force directory mode = 0777
directory mode = 0777[/quote]

valid users = sambaguest 注释掉看看。[/quote]
我确实已经去除了上面的语句,但还是不行,难道真的和我说的那样:根目录级别新建立的文件夹即使开了权限也无法给SAMBA用户用?

后来又重新进入,好象OK啦
~
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-8 18:44 , Processed in 0.051232 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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