QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 910|回复: 5

samba配制不好。(已解决)

[复制链接]
发表于 2004-10-1 00:26:22 | 显示全部楼层 |阅读模式
使用版本LINUX 3 AS实现与XP机子互访,花了时间都配制不好,现贴出源文件FSB.CONF,大家指点一下。我已经再XP和LINUX下建立了相同的帐号。且已经在
/etc/samba下产生了smbpasswd文件
[code:1]#======================= Global Settings =====================================
[global]
   workgroup = workgroup
   netbios name = server

   server string = Samba Server

;   hosts allow = 192.168.1. 192.168.2. 127.

   printcap name = /etc/printcap
   load printers = yes

;   printing = bsd

  guest account = nobody

   log file = /var/log/samba/%m.log

   max log size = 50

   security = user
# Use password server option only with security = server
;   password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
;  password level = 8
;  uname level = 8

;  encrypt passwords = yes
;  smb passwd file = /etc/samba/smbpasswd

;  unix password sync = Yes
;  passwd program = /usr/bin/passwd %u
;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password*
;  uname map = /etc/samba/smbusers

;   include = /etc/samba/smb.conf.%m

   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
# Cause this host to announce itself to local subnets here
;   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
# run a specific logon batch file per uname
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U

; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#        Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

;   wins proxy = yes
   dns proxy = no

;  preserve case = no
;  short preserve case = no
# Default case is normally upper case for all DOS files
;  default case = lower
# Be very careful with case sensitivity - it can break things!
;  case sensitive = no

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   path = /mnt/hda6
   browseable = yes
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /home/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /home/profiles
;    browseable = no
;    guest ok = yes

# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   read only = yes
;   write list = @staff

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

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

;[pchome]
;  comment = PC Directories
;  path = /usr/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

[th]
        comment = linux th
        path = /home/th
        guest ok = yes
[/code:1]
发表于 2004-10-1 21:59:56 | 显示全部楼层
1. 你说的“配置不好”有什么错误表现?
2. 为什么把 [homes] 段的  path 指定为一个固定目录?
回复

使用道具 举报

 楼主| 发表于 2004-10-2 22:11:05 | 显示全部楼层
是防火墙问题,已经解决了。
不过有点不明白。
我在[HOMES]段中给他指定path=/mnt/hda6
目的很明显是想访问VFAT分区。
可惜在实际访问中不能达到这种效果。
为什么你一眼就提出这个错误。
这样做有什么不对吗?
回复

使用道具 举报

发表于 2004-10-2 22:40:39 | 显示全部楼层
哦,这么做不是不对,而是有点不合常理而已:)
本来设 [homes] 段的用意就是给每个 samba 用户一个自己的“漫游目录”似的共享,把它设成固定的一个地点安全上…… 当然你只给一个人用就无所谓了   其实真的要那样也可以另设一个共享比如你的 [th] ,而不必去让 [homes] 产生歧义。

“不能达到这种效果”是不能访问吗? /mnt/hda6 是以什么参数挂载的?设 mode 或者 umask 了吗?
或者,不考虑安全问题,加上 force user = root
回复

使用道具 举报

 楼主| 发表于 2004-10-4 18:34:37 | 显示全部楼层
我是在fstab文件中增加如下行来加载VFAT分区的。
/dev/hda6    /mnt/hda6     vfat    codepage=950,iocharset=gb2312      1 1

我用企图加载/mnt/hda6分区在[HOMES]段中。目的是希望网络中能访问我的VFAT分区,因为我的资料都放在该分区中的。

但是我这样加载后 path = /mnt/hda6
访问时,仍和[th]段效果一样,即还是进入th目录了。晕。
回复

使用道具 举报

发表于 2004-10-5 00:36:35 | 显示全部楼层
[quote:f43953bd7a="天鹤"]……
访问时,仍和[th]段效果一样,即还是进入th目录了。晕。[/quote]
访问的UNC路径是什么? \\XXX\homes ?

fstab 里改一下:[code:1]/dev/hda6   /mnt/hda6   vfat   umask=022,iocharset=gb2312   1 1
这里的umask 按你的需要改。cp950与gb2312不是一家的。[/code:1]
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-7 14:39 , Processed in 0.040485 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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