Chinaunix

标题: 我新来得...问一下关于Samba得问题,该到哪里问??? [打印本页]

作者: hgkrt    时间: 2003-01-22 08:37
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
设置好了Samba,
在主机上smbclient -L 主机/客户机都可以看到

但是到了XP客户机上就不行了...有时候可以在网络连接中看到Samba服务器,可是连接就提示,网络路径不对...

有时候又看都看不到!!!(在普通用户更是看不到)

请问XP端要怎么配置呢???
作者: lycxlove    时间: 2003-01-22 08:53
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
防火墙关掉吧
作者: hgkrt    时间: 2003-01-22 08:59
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
关掉???

那我服务器不是大门大开么!

还有,都说ipchains和iptables不能同时启动,可是我怎么看到我的init.d里这两个都有呀!!!而且都是S20的设置...

请问在哪里改她们的配置文件!!!
作者: lycxlove    时间: 2003-01-22 09:00
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
那就让防火墙允许samba
作者: cctech    时间: 2003-01-22 09:30
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
XP上有没有NETBIOS或NETBIEU协议?
作者: hgkrt    时间: 2003-01-22 09:32
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
昨天装了也没用...
作者: 红袖添香    时间: 2003-01-22 09:45
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
...

=============== cut here =======================
REGEDIT4

;
; This registry key (gathered from the Samba-tng lists) is needed
; for a Windows XP client to join and logon to a Samba domain
;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\netlogon\parameters
"RequireSignOrSeal"=dword:00000000
=============================================

paste the content to a text editor, and the save it as a *.reg file. double click on it, this registry key will be inserted or overwritten in winxp's reg database.

please ensure that you use encrypted password in your smb.conf

encrypt passwords = yes
作者: hgkrt    时间: 2003-01-22 09:51
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
老大,我没有把samba设置成Domain,没有做netlogon...

怎么办???
作者: 红袖添香    时间: 2003-01-22 10:01
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
...

workgroup 也一样。
作者: hgkrt    时间: 2003-01-22 10:08
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
好,我下午回家试试...

请问,和防火墙有关么???
作者: seawolf1979    时间: 2003-01-22 10:14
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
我的数值是1,不过samba是可以用的。
可能不是这个问题吧,我也不知道。

原帖由 "红袖添香" 发表:
...

=============== cut here =======================
REGEDIT4

;
; This registry key (gathered from the Samba-tng lists) is needed
; for a Windows XP client to join and logon to a Samba domain..........

作者: 红袖添香    时间: 2003-01-22 10:22
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
原帖由 "hgkrt" 发表:
好,我下午回家试试...

请问,和防火墙有关么???


有关系。

防火墙上要打开 TCP139, UDP 137,138
作者: hgkrt    时间: 2003-01-22 13:12
标题: 我新来得...问一下关于Samba得问题,该到哪里问???

作者: chu888    时间: 2003-01-22 13:19
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
这个问题我见过,不是防火墙的问题,都可以找到samba服务器,那么就不是防火墙的问题,这个网络路径不对,大部分是因为你的smb.conf配置文件有问题,请把/etc/samba/smb.conf文件贴出。。。
作者: hgkrt    时间: 2003-01-22 13:57
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
[quote]原帖由 "chu888"]这个问题我见过,不是防火墙的问题,都可以找到samba服务器,那么就不是防火墙的问题,这个网络路径不对,大部分是因为你的smb.conf配置文件有问题,请把/etc/samba/smb.conf文件贴出。。。[/quote 发表:


我刚才用smbmount了Win上的分区,把文件给cp过来了。.(从linux可以看到WinXP)
  1. # This is the main Samba configuration file. You should read the

  2. # smb.conf(5) manual page in order to understand the options listed

  3. # here. Samba has a huge number of configurable options (perhaps too

  4. # many!) most of which are not shown in this example

  5. #
  6. # Any line which starts with a ; (semi-colon) or a
  7. # (hash)

  8. # is a comment and is ignored. In this example we will use a
  9. #
  10. # for commentry and a ; for parts of the config file that you

  11. # may wish to enable

  12. #
  13. # NOTE: Whenever you modify this file you should run the command "testparm"

  14. # to check that you have not many any basic syntactic errors.

  15. #
  16. #======================= Global Settings =====================================
  17. [global]


  18. # netbios name = SMBServer

  19.    netbios name = SMBServer

  20. # workgroup = NT-Domain-Name or Workgroup-Name

  21.    workgroup = MYGROUP


  22. # server string is the equivalent of the NT Description field

  23.    server string = Samba Server


  24. # language support

  25.    client code page = 936


  26. # This option is important for security. It allows you to restrict

  27. # connections to machines which are on your local network. The

  28. # following example restricts access to two C class networks and

  29. # the "loopback" interface. For more examples of the syntax see

  30. # the smb.conf man page
  31.    hosts allow = 192.168.1. 127.


  32. # if you want to automatically load your printer list rather

  33. # than setting them up individually then you'll need this

  34. ;   printcap name = /etc/printcap

  35. ;   load printers = no


  36. # It should not be necessary to spell out the print system type unless

  37. # yours is non-standard. Currently supported print systems include:

  38. # bsd, sysv, plp, lprng, aix, hpux, qnx
  39. ;   printing = lprng


  40. # Uncomment this if you want a guest account, you must add this to /etc/passwd

  41. #otherwise the user "nobody" is used

  42. ;  guest account = pp


  43. # this tells Samba to use a separate log file for each machine

  44. # that connects
  45.    log file = /var/log/samba/%m.log


  46. # Put a capping on the size of the log files (in Kb).

  47.    max log size = 30


  48. # Security mode. Most people will want user level security. See

  49. # security_level.txt for details.

  50.    security = user

  51. # Use password server option only with security = server or

  52. # security = domain

  53. ;   password server = <NT-Server-Name>;


  54. # Password Level allows matching of _n_ characters of the password for

  55. # all combinations of upper and lower case.

  56. ;  password level = 8
  57. ;  username level = 8


  58. # You may wish to use password encryption. Please read

  59. # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.

  60. # Do not enable this option unless you have read those documents

  61.   encrypt passwords = yes

  62.   smb passwd file = /etc/samba/smbpasswd


  63. # The following is needed to keep smbclient from spouting spurious errors

  64. # when Samba is built with support for SSL.

  65.    ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt
  66. # The following are needed to allow password changing from Windows to

  67. # update the Linux sytsem password also.

  68. # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
  69. #
  70. NOTE2: You do NOT need these to allow workstations to change only
  71. # the encrypted SMB passwords. They allow the Unix password

  72. #        to be kept in sync with the SMB password.

  73. ;  unix password sync = Yes

  74. ;  passwd program = /usr/bin/passwd %u
  75. ;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
  76. *passwd:*all*authentication*tokens*updated*successfully*


  77. # Unix users can map to different SMB User names

  78. ;  username map = /etc/samba/smbusers


  79. # map to guest
  80.    map to guest = Bad User


  81. # Using the following line enables you to customise your configuration

  82. # on a per machine basis. The %m gets replaced with the netbios name

  83. # of the machine that is connecting

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


  85. # Most people will find that this option gives better performance.

  86. # See speed.txt and the manual pages for details

  87.    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192


  88. # Configure Samba to use multiple interfaces

  89. # If you have multiple network interfaces then you must list them

  90. # here. See the man page for details.
  91. ;   interfaces = 192.168.1.2/24
  92. #change here


  93. # Configure remote browse list synchronisation here

  94. #  request announcement to, or browse list sync from:

  95. #        a specific host or from / to a whole subnet (see below)

  96. ;   remote browse sync = 192.168.3.25 192.168.5.255

  97. # Cause this host to announce itself to local subnets here

  98. ;   remote announce = 192.168.1.255 192.168.2.44


  99. # Browser Control Options:

  100. # set local master to no if you don't want Samba to become a master

  101. # browser on your network. Otherwise the normal election rules apply

  102. ;   local master = no


  103. # OS Level determines the precedence of this server in master browser

  104. # elections. The default value should be reasonable

  105. ;   os level = 33


  106. # Domain Master specifies Samba to be the Domain Master Browser. This

  107. # allows Samba to collate browse lists between subnets. Don't use this

  108. # if you already have a Windows NT domain controller doing this job

  109. ;   domain master = yes


  110. # Preferred Master causes Samba to force a local browser election on startup
  111. # and gives it a slightly higher chance of winning the election

  112. ;   preferred master = yes


  113. # Enable this if you want Samba to be a domain logon server for

  114. # Windows95 workstations.

  115. ;   domain logons = yes


  116. # if you enable domain logons then you may want a per-machine or

  117. # per user logon script

  118. # run a specific logon batch file per workstation (machine)

  119. ;   logon script = %m.bat

  120. # run a specific logon batch file per username

  121. ;   logon script = %U.bat


  122. # All NetBIOS names must be resolved to IP Addresses

  123. # 'Name Resolve Order' allows the named resolution mechanism to be specified

  124. # the default order is "host lmhosts wins bcast". "host" means use the unix

  125. # system gethostbyname() function call that will use either /etc/hosts OR

  126. # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf

  127. # and the /etc/resolv.conf file. "host" therefore is system configuration

  128. # dependant. This parameter is most often of use to prevent DNS lookups

  129. # in order to resolve NetBIOS names to IP Addresses. Use with care!

  130. # The example below excludes use of name resolution for machines that are NOT

  131. # on the local network segment

  132. # - OR - are not deliberately to be known via lmhosts or via WINS.

  133. ; name resolve order = wins lmhosts bcast


  134. # Windows Internet Name Serving Support Section:

  135. # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server

  136.    wins support = yes


  137. # WINS Server - Tells the NMBD components of Samba to be a WINS Client

  138. #        Note: Samba can be either a WINS Server, or a WINS Client, but NOT both

  139. ;   wins server = w.x.y.z


  140. # WINS Proxy - Tells Samba to answer name resolution queries on

  141. # behalf of a non WINS capable client, for this to work there must be

  142. # at least one        WINS Server on the network. The default is NO.

  143. ;   wins proxy = yes


  144. # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names

  145. # via DNS nslookups. The built-in default for versions 1.9.17 is yes,

  146. # this has been changed in version 1.9.18 to no.
  147.    dns proxy = no


  148. # Case Preservation can be handy - system default is _no_

  149. # NOTE: These can be set on a per share basis
  150. ;  preserve case = no
  151. ;  short preserve case = no

  152. # Default case is normally upper case for all DOS files

  153. ;  default case = lower

  154. # Be very careful with case sensitivity - it can break things!

  155. ;  case sensitive = no


  156. #============================ Share Definitions ==============================
  157. [
  158. homes]

  159.    comment = Home Directories
  160.    path = /home/%U

  161.    browseable = no

  162.    writable = yes


  163. # Un-comment the following and create the netlogon directory for Domain Logons

  164. ; [netlogon]

  165. ;   comment = Network Logon Service
  166. ;   path = /home/netlogon

  167. ;   guest ok = yes

  168. ;   writable = no

  169. ;   share modes = no



  170. # Un-comment the following to provide a specific roving profile shar

  171. #the default is to use the user's home directory
  172. ;[Profiles]

  173. ;    path = /home/profiles

  174. ;    browseable = no

  175. ;    guest ok = yes



  176. # NOTE: If you have a BSD-style print system there is no need to

  177. # specifically define each individual printer

  178. ; [Printers]
  179. ;  comment = All Printers

  180. ;  path = /var/spool/samba

  181. ;  browseable = no

  182. # Set public = yes to allow user 'guest account' to print

  183. ;   guest ok = no

  184. ;   printable = yes


  185. # This one is useful for people to share files

  186. ;[tmp]

  187. ;   comment = Temporary file space

  188. ;   path = /tmp
  189. ;   read only = no

  190. ;   public = yes


  191. # A publicly accessible directory, but read only, except for people in

  192. # the "staff" group
  193. ;[public]
  194. ;   comment = Public Stuff
  195. ;   path = /home/samba

  196. ;   public = yes

  197. ;   writable = yes

  198. ;   printable = no

  199. ;   write list = @staff


  200. # Other examples.

  201. #
  202. # A private printer, usable only by fred. Spool data will be placed in fred's

  203. # home directory. Note that fred must have write access to the spool directory,

  204. # wherever it is.
  205. ;[fredsprn]

  206. ;   comment = Fred's Printer

  207. ;   valid users = fred

  208. ;   path = /homes/fred

  209. ;   printer = freds_printer

  210. ;   public = no

  211. ;   printable = yes


  212. # A private directory, usable only by fred. Note that fred requires write

  213. # access to the directory.

  214. ;[fredsdir]

  215. ;   comment = Fred's Service

  216. ;   path = /usr/somewhere/private

  217. ;   valid users = fred
  218. ;   public = no

  219. ;   writable = yes

  220. ;   printable = no


  221. # a service which has a different directory for each machine that connects

  222. # this allows you to tailor configurations to incoming machines. You could
  223. # also use the %u option to tailor it by user name.

  224. # The %m gets replaced with the machine name that is connecting.

  225. ;[pchome]

  226. ;  comment = PC Directories

  227. ;  path = /usr/pc/%m

  228. ;  public = no
  229. ;  writable = yes


  230. # A publicly accessible directory, read/write to all users. Note that all files

  231. # created in the directory by users will be owned by the default user, so

  232. # any user with access can delete any other user's files. Obviously this

  233. # directory must be writable by the default user. Another user could of course

  234. # be specified, in which case all files would be owned by that user instead.

  235. ;[public]

  236. ;   path = /usr/somewhere/else/public

  237. ;   public = yes

  238. ;   only guest = yes

  239. ;   writable = yes

  240. ;   printable = no


  241. # The following two entries demonstrate how to share a directory so that two

  242. # users can place files there that will be owned by the specific users. In this

  243. # setup, the directory should be writable by both users and should have the

  244. # sticky bit set on it to prevent abuse. Obviously this could be extended to

  245. # as many users as required.

  246. [myshare]

  247.    comment = shared file

  248.    path = /home/shared

  249.    public = yes

  250.    writable = yes

  251.    create mask = 0777

  252.    force create mode = 0777


复制代码

作者: arlenecc    时间: 2003-01-22 16:07
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
晕,这么一群人在讨论samba。看来大家都很闲
作者: hgkrt    时间: 2003-01-22 16:11
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
闲???我到现在还只能从linux看XP,从XP下看不到linux....

你能告诉我吗???
作者: coolfree    时间: 2003-01-22 19:43
提示: 作者被禁止或删除 内容自动屏蔽
作者: wolfop    时间: 2003-01-22 21:08
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
关闭你的samba的wins support看看,好像看不出什么错误,你的host allow应该没有错误吧?
作者: coolfree    时间: 2003-01-23 14:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: 开心石头    时间: 2003-01-23 14:22
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
在xp下安装netbieu协议,安装方法可以在网上搜索!
作者: cctech    时间: 2003-01-29 00:26
标题: 我新来得...问一下关于Samba得问题,该到哪里问???
你首先在WINDOWS上用CMD下的命令
nbtstat -a xx.xx.xx.xx
试一下,如果你取不到主机信息的话,请关闭你的防火墙再试,如果还不行,那证明你的WINDOWS上没有NETBIOS
如果能够取到主机名信息,毫无疑问,应该查UNIX,我们可以继续交流.
CCTECH@VIP.SINA.COM




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2