Advertisement
Guest User

Untitled

a guest
Sep 7th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.29 KB | None | 0 0
  1. I have the following setup a dsl modem/router. As it's reach is not that great or maybe our house is too big :p i have taken out my old linksys router with dr-wrt on it and installed it as repeater bridge according to this guide:
  2. my dsl model router IP is 10.0.0.1 as DNS i use opendns entries so 208....
  3. My Samba server is on ubuntu 12.04 with Samba version 3.6.3. It is connected via a cable to the linksys repeater bridge and I have given it this networks info:
  4. IP 10.0.0.96
  5. subnet 255.255.255.0
  6. gateway 10.0.0.1
  7. dns 208
  8.  
  9. hostname: SAT
  10. /etc/hosts entries:
  11.  
  12. 127.0.0.1 localhost SAT
  13. #127.0.1.1 SAT
  14. 10.0.0.96 SAT
  15.  
  16. The samba client that I'm trying to connect is connected to via wifi to the linksys repeater bridge and is using dhcp (which is handed out from the dsl modem/router) and looks like this:
  17. IP 10.0.0.79
  18. subnet 255.255.255.0
  19. gateway 10.0.0.1
  20. dns 208
  21. host: darkstar
  22.  
  23. The problem is that the mounts/samba shares seem unstable sometimes it works for hours at a time and sometimes i can't mount (using IP or hostname) although I can ping and ssh into machines and sometimes it just seems to stop working. Or it does mount, I can see the content of the shared folder but when i want to go deaper it does not work.
  24. Looking into the log files, first from the samba server (10.0.0.96)
  25.  
  26. log.smbd:
  27.  
  28. [2013/09/04 22:03:02, 0] smbd/server.c:1051(main)
  29. smbd version 3.6.3 started.
  30. Copyright Andrew Tridgell and the Samba Team 1992-2011
  31. [2013/09/04 22:03:02.632675, 0] smbd/server.c:1107(main)
  32. standard input is not a socket, assuming -D option
  33. [2013/09/04 22:11:23, 0] smbd/server.c:1051(main)
  34. smbd version 3.6.3 started.
  35. Copyright Andrew Tridgell and the Samba Team 1992-2011
  36. [2013/09/04 22:11:23.859290, 0] smbd/server.c:1107(main)
  37. standard input is not a socket, assuming -D option
  38. [2013/09/04 22:15:58, 0] smbd/server.c:1051(main)
  39. smbd version 3.6.3 started.
  40. Copyright Andrew Tridgell and the Samba Team 1992-2011
  41. [2013/09/04 22:15:58.549845, 0] smbd/server.c:1107(main)
  42. standard input is not a socket, assuming -D option
  43. [2013/09/05 02:01:23, 0] smbd/server.c:1051(main)
  44. smbd version 3.6.3 started.
  45. Copyright Andrew Tridgell and the Samba Team 1992-2011
  46. [2013/09/05 02:01:23.306385, 0] smbd/server.c:1107(main)
  47. standard input is not a socket, assuming -D option
  48. [2013/09/05 02:10:19, 0] smbd/server.c:1051(main)
  49. smbd version 3.6.3 started.
  50. Copyright Andrew Tridgell and the Samba Team 1992-2011
  51. [2013/09/05 02:10:19.970112, 0] smbd/server.c:1107(main)
  52. standard input is not a socket, assuming -D option
  53.  
  54. I searched on this and asked on IRC and was told that this is probably not the cause and I can ignore it.
  55.  
  56. log.nmbd:
  57.  
  58. [2013/09/06 21:33:40, 0] nmbd/nmbd_incomingdgrams.c:311(process_local_master_announce)
  59. process_local_master_announce: Server DARKSTAR at IP 10.0.0.79 is announcing itself as a local master browser for workgroup WORKGROUP and we think we are master. Forcing ele$
  60. [2013/09/06 21:33:40, 0] nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
  61. *****
  62.  
  63. Samba name server SAT has stopped being a local master browser for workgroup WORKGROUP on subnet 10.0.0.96
  64.  
  65. *****
  66. [2013/09/06 21:33:57, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  67. *****
  68.  
  69. Samba name server SAT is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.96
  70.  
  71. *****
  72. [2013/09/06 21:37:47, 0] nmbd/nmbd_incomingdgrams.c:311(process_local_master_announce)
  73. process_local_master_announce: Server DARKSTAR at IP 10.0.0.79 is announcing itself as a local master browser for workgroup WORKGROUP and we think we are master. Forcing ele$
  74. [2013/09/06 21:37:47, 0] nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success)
  75. *****
  76.  
  77. Samba name server SAT has stopped being a local master browser for workgroup WORKGROUP on subnet 10.0.0.96
  78.  
  79. *****
  80. [2013/09/06 21:49:45, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  81. *****
  82.  
  83. Samba name server SAT is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.96
  84.  
  85. *****
  86.  
  87. some fighting about who is master but seems to be resolved.
  88.  
  89. Looking at the log files of the samba client (who is also sharing stuff but that is of no interest atm):
  90.  
  91. log.smbd
  92. [2013/09/06 21:27:43.696607, 0] smbd/server.c:1107(main)
  93. standard input is not a socket, assuming -D option
  94. [2013/09/06 21:27:43.704073, 0] printing/print_cups.c:110(cups_connect)
  95. Unable to connect to CUPS server localhost:631 - Connection refused
  96. [2013/09/06 21:27:43.704497, 0] printing/print_cups.c:487(cups_async_callback)
  97. failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
  98. [2013/09/07 14:19:01, 0] smbd/server.c:1051(main)
  99. smbd version 3.6.3 started.
  100. Copyright Andrew Tridgell and the Samba Team 1992-2011
  101. [2013/09/07 14:19:01.931610, 0] smbd/server.c:1107(main)
  102. standard input is not a socket, assuming -D option
  103.  
  104. same as above so let's move on:
  105.  
  106. *****
  107. [2013/09/06 21:28:19, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  108. *****
  109.  
  110. Samba name server DARKSTAR is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.79
  111.  
  112. *****
  113. [2013/09/06 21:37:47, 0] nmbd/nmbd_incomingrequests.c:118(process_name_release_request)
  114. process_name_release_request: Attempt to release name WORKGROUP<1d> from IP 10.0.0.96 on subnet 10.0.0.79 being rejected as it is one of our names.
  115. [2013/09/07 06:27:53, 0] nmbd/nmbd.c:66(terminate)
  116. Got SIGTERM: going down...
  117. [2013/09/07 14:19:14, 0] nmbd/nmbd.c:860(main)
  118. nmbd version 3.6.3 started.
  119. Copyright Andrew Tridgell and the Samba Team 1992-2011
  120. [2013/09/07 14:19:16, 0] nmbd/nmbd_namequery.c:109(query_name_response)
  121. query_name_response: Multiple (2) responses received for a query on subnet 10.0.0.79 for name WORKGROUP<1d>.
  122. This response was from IP 10.0.0.96, reporting an IP address of 10.0.0.96.
  123. [2013/09/07 14:19:37, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  124. *****
  125.  
  126. Samba name server DARKSTAR is now a local master browser for workgroup WORKGROUP on subnet 172.16.223.1
  127.  
  128. *****
  129. [2013/09/07 14:19:37, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  130. *****
  131.  
  132. Samba name server DARKSTAR is now a local master browser for workgroup WORKGROUP on subnet 192.168.75.1
  133.  
  134. *****
  135.  
  136. here some dmesg entries:
  137.  
  138. [ 8935.242282] CIFS VFS: default security mechanism requested. The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3
  139. [ 9155.699604] CIFS VFS: cifs_mount failed w/return code = -512
  140. [ 9239.223375] CIFS VFS: Server 10.0.0.96 has not responded in 300 seconds. Reconnecting...
  141. [ 9539.569671] CIFS VFS: Server 10.0.0.96 has not responded in 300 seconds. Reconnecting...
  142. [ 9539.569841] CIFS VFS: Send error in SETFSUnixInfo = -11
  143. [ 9839.907907] CIFS VFS: Server 10.0.0.96 has not responded in 300 seconds. Reconnecting...
  144. [ 9839.908054] CIFS VFS: Send error in SETFSUnixInfo = -11
  145.  
  146.  
  147.  
  148. and here the config file for the samba server:
  149. #
  150. # Sample configuration file for the Samba suite for Debian GNU/Linux.
  151. #
  152. #
  153. # This is the main Samba configuration file. You should read the
  154. # smb.conf(5) manual page in order to understand the options listed
  155. # here. Samba has a huge number of configurable options most of which
  156. # are not shown in this example
  157. #
  158. # Some options that are often worth tuning have been included as
  159. # commented-out examples in this file.
  160. # - When such options are commented with ";", the proposed setting
  161. # differs from the default Samba behaviour
  162. # - When commented with "#", the proposed setting is the default
  163. # behaviour of Samba but the option is considered important
  164. # enough to be mentioned here
  165. #
  166. # NOTE: Whenever you modify this file you should run the command
  167. # "testparm" to check that you have not made any basic syntactic
  168. # errors.
  169. # A well-established practice is to name the original file
  170. # "smb.conf.master" and create the "real" config file with
  171. # testparm -s smb.conf.master >smb.conf
  172. # This minimizes the size of the really used smb.conf file
  173. # which, according to the Samba Team, impacts performance
  174. # However, use this with caution if your smb.conf file contains nested
  175. # "include" statements. See Debian bug #483187 for a case
  176. # where using a master file is not a good idea.
  177. #
  178.  
  179. #======================= Global Settings =======================
  180.  
  181. [global]
  182. log file = /var/log/samba/log.%m
  183. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  184. socket options = TCP_NODELAY
  185. obey pam restrictions = yes
  186. map to guest = bad user
  187. encrypt passwords = true
  188. passwd program = /usr/bin/passwd %u
  189. passdb backend = tdbsam
  190. dns proxy = no
  191. server string = %h server (Samba, Ubuntu)
  192. unix password sync = yes
  193. workgroup = webchilla
  194. os level = 20
  195. socket address = 10.0.0.96
  196. syslog = 0
  197. panic action = /usr/share/samba/panic-action %d
  198. usershare allow guests = yes
  199. max log size = 1000
  200. pam password change = yes
  201.  
  202. ## Browsing/Identification ###
  203.  
  204. # Change this to the workgroup/NT-domain name your Samba server will part of
  205.  
  206. # server string is the equivalent of the NT Description field
  207.  
  208. # Windows Internet Name Serving Support Section:
  209. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  210. # wins support = no
  211.  
  212. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  213. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  214. ; wins server = w.x.y.z
  215.  
  216. # This will prevent nmbd to search for NetBIOS names through DNS.
  217.  
  218. # What naming service and in what order should we use to resolve host names
  219. # to IP addresses
  220. ; name resolve order = lmhosts host wins bcast
  221.  
  222. #### Networking ####
  223.  
  224. # The specific set of interfaces / networks to bind to
  225. # This can be either the interface name or an IP address/netmask;
  226. # interface names are normally preferred
  227. ; interfaces = 127.0.0.0/8 eth0
  228.  
  229. # Only bind to the named interfaces and/or networks; you must use the
  230. # 'interfaces' option above to use this.
  231. # It is recommended that you enable this feature if your Samba machine is
  232. # not protected by a firewall or is a firewall itself. However, this
  233. # option cannot handle dynamic or non-broadcast interfaces correctly.
  234. ; bind interfaces only = yes
  235.  
  236.  
  237.  
  238. #### Debugging/Accounting ####
  239.  
  240. # This tells Samba to use a separate log file for each machine
  241. # that connects
  242.  
  243. # Cap the size of the individual log files (in KiB).
  244.  
  245. # If you want Samba to only log through syslog then set the following
  246. # parameter to 'yes'.
  247. # syslog only = no
  248.  
  249. # We want Samba to log a minimum amount of information to syslog. Everything
  250. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  251. # through syslog you should set the following parameter to something higher.
  252.  
  253. # Do something sensible when Samba crashes: mail the admin a backtrace
  254.  
  255.  
  256. ####### Authentication #######
  257.  
  258. # "security = user" is always a good idea. This will require a Unix account
  259. # in this server for every user accessing the server. See
  260. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  261. # in the samba-doc package for details.
  262. # security = user
  263.  
  264. # You may wish to use password encryption. See the section on
  265. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  266.  
  267. # If you are using encrypted passwords, Samba will need to know what
  268. # password database type you are using.
  269.  
  270.  
  271. # This boolean parameter controls whether Samba attempts to sync the Unix
  272. # password with the SMB password when the encrypted SMB password in the
  273. # passdb is changed.
  274.  
  275. # For Unix password sync to work on a Debian GNU/Linux system, the following
  276. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  277. # sending the correct chat script for the passwd program in Debian Sarge).
  278.  
  279. # This boolean controls whether PAM will be used for password changes
  280. # when requested by an SMB client instead of the program listed in
  281. # 'passwd program'. The default is 'no'.
  282.  
  283. # This option controls how unsuccessful authentication attempts are mapped
  284. # to anonymous connections
  285.  
  286. ########## Domains ###########
  287.  
  288. # Is this machine able to authenticate users. Both PDC and BDC
  289. # must have this setting enabled. If you are the BDC you must
  290. # change the 'domain master' setting to no
  291. #
  292. ; domain logons = yes
  293. #
  294. # The following setting only takes effect if 'domain logons' is set
  295. # It specifies the location of the user's profile directory
  296. # from the client point of view)
  297. # The following required a [profiles] share to be setup on the
  298. # samba server (see below)
  299. ; logon path = \\%N\profiles\%U
  300. # Another common choice is storing the profile in the user's home directory
  301. # (this is Samba's default)
  302. # logon path = \\%N\%U\profile
  303.  
  304. # The following setting only takes effect if 'domain logons' is set
  305. # It specifies the location of a user's home directory (from the client
  306. # point of view)
  307. ; logon drive = H:
  308. # logon home = \\%N\%U
  309.  
  310. # The following setting only takes effect if 'domain logons' is set
  311. # It specifies the script to run during logon. The script must be stored
  312. # in the [netlogon] share
  313. # NOTE: Must be store in 'DOS' file format convention
  314. ; logon script = logon.cmd
  315.  
  316. # This allows Unix users to be created on the domain controller via the SAMR
  317. # RPC pipe. The example command creates a user account with a disabled Unix
  318. # password; please adapt to your needs
  319. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  320.  
  321. # This allows machine accounts to be created on the domain controller via the
  322. # SAMR RPC pipe.
  323. # The following assumes a "machines" group exists on the system
  324. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  325.  
  326. # This allows Unix groups to be created on the domain controller via the SAMR
  327. # RPC pipe.
  328. ; add group script = /usr/sbin/addgroup --force-badname %g
  329.  
  330. ########## Printing ##########
  331.  
  332. # If you want to automatically load your printer list rather
  333. # than setting them up individually then you'll need this
  334. # load printers = yes
  335.  
  336. # lpr(ng) printing. You may wish to override the location of the
  337. # printcap file
  338. ; printing = bsd
  339. ; printcap name = /etc/printcap
  340.  
  341. # CUPS printing. See also the cupsaddsmb(8) manpage in the
  342. # cupsys-client package.
  343. ; printing = cups
  344. ; printcap name = cups
  345.  
  346. ############ Misc ############
  347.  
  348. # Using the following line enables you to customise your configuration
  349. # on a per machine basis. The %m gets replaced with the netbios name
  350. # of the machine that is connecting
  351. ; include = /home/samba/etc/smb.conf.%m
  352.  
  353. # Most people will find that this option gives better performance.
  354. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  355. # for details
  356. # You may want to add the following on a Linux system:
  357. # SO_RCVBUF=8192 SO_SNDBUF=8192
  358. # socket options = TCP_NODELAY
  359.  
  360. # The following parameter is useful only if you have the linpopup package
  361. # installed. The samba maintainer and the linpopup maintainer are
  362. # working to ease installation and configuration of linpopup and samba.
  363. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  364.  
  365. # Domain Master specifies Samba to be the Domain Master Browser. If this
  366. # machine will be configured as a BDC (a secondary logon server), you
  367. # must set this to 'no'; otherwise, the default behavior is recommended.
  368. # domain master = auto
  369.  
  370. # Some defaults for winbind (make sure you're not using the ranges
  371. # for something else.)
  372. ; idmap uid = 10000-20000
  373. ; idmap gid = 10000-20000
  374. ; template shell = /bin/bash
  375.  
  376. # The following was the default behaviour in sarge,
  377. # but samba upstream reverted the default because it might induce
  378. # performance issues in large organizations.
  379. # See Debian bug #368251 for some of the consequences of *not*
  380. # having this setting and smb.conf(5) for details.
  381. ; winbind enum groups = yes
  382. ; winbind enum users = yes
  383.  
  384. # Setup usershare options to enable non-root users to share folders
  385. # with the net usershare command.
  386.  
  387. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  388. ; usershare max shares = 100
  389.  
  390. # Allow users who've been granted usershare privileges to create
  391. # public shares, not just authenticated ones
  392.  
  393. #======================= Share Definitions =======================
  394.  
  395. # Un-comment the following (and tweak the other settings below to suit)
  396. # to enable the default home directory shares. This will share each
  397. # user's home director as \\server\username
  398. ;[homes]
  399. ; comment = Home Directories
  400. ; browseable = no
  401.  
  402. # By default, the home directories are exported read-only. Change the
  403. # next parameter to 'no' if you want to be able to write to them.
  404. ; read only = yes
  405.  
  406. # File creation mask is set to 0700 for security reasons. If you want to
  407. # create files with group=rw permissions, set next parameter to 0775.
  408. ; create mask = 0700
  409.  
  410. # Directory creation mask is set to 0700 for security reasons. If you want to
  411. # create dirs. with group=rw permissions, set next parameter to 0775.
  412. ; directory mask = 0700
  413.  
  414. # By default, \\server\username shares can be connected to by anyone
  415. # with access to the samba server. Un-comment the following parameter
  416. # to make sure that only "username" can connect to \\server\username
  417. # The following parameter makes sure that only "username" can connect
  418. #
  419. # This might need tweaking when using external authentication schemes
  420. ; valid users = %S
  421.  
  422. # Un-comment the following and create the netlogon directory for Domain Logons
  423. # (you need to configure Samba to act as a domain controller too.)
  424. ;[netlogon]
  425. ; comment = Network Logon Service
  426. ; path = /home/samba/netlogon
  427. ; guest ok = yes
  428. ; read only = yes
  429.  
  430. # Un-comment the following and create the profiles directory to store
  431. # users profiles (see the "logon path" option above)
  432. # (you need to configure Samba to act as a domain controller too.)
  433. # The path below should be writable by all users so that their
  434. # profile directory may be created the first time they log on
  435. ;[profiles]
  436. ; comment = Users profiles
  437. ; path = /home/samba/profiles
  438. ; guest ok = no
  439. ; browseable = no
  440. ; create mask = 0600
  441. ; directory mask = 0700
  442.  
  443.  
  444.  
  445. [Video]
  446. writeable = yes
  447. path = /home/funky1/Videos
  448.  
  449. [Musik]
  450. writeable = yes
  451. path = /home/funky1/Music
  452.  
  453. [Resimler]
  454. writeable = yes
  455. path = /home/funky1/Pictures
  456.  
  457. [SAT-media]
  458. writeable = yes
  459. path = /media
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement