Hi, We have managed to compile samba3 (v 3.0.24 that ships with openwrt/ kamizake) for our ubicom32 platform and programmed a board with it, however I am not able to access a samba share on the board. When trying to access the OpenWRT router (using the smbclient command) I get: Error NT_STATUS_CONNECTION_REFUSED The device is reachable from my linux box (otherwise I should have seen a Error NT_STATUS_HOST_UNREACHABLE) I am hoping you can help us out. Below is a small list of observations/questions: 1. I noticed that the nmbd service is not recognized by our console. I don't know why that is the case, but the 'smbd' service is. Samba 3 doesn't provide any such menuconfig option to turn nmbd on or off. After reading the documentation, I learned that nmbd is used for name registration and resolution requests, and should be started BEFORE smbd. It looks like under openwrt/build_dir/ubicom32/samba-3.0.24/source/bin, smbd is present but nmbd is not. It is not getting compiled for some reason, and the default samba compilation did not compile it or complain of it not being compiled. I found the target in the Makefile under samba-3.0.24/source - I believe it is called bin/nmbd (line 948), and it is called by SBIN_PROGS (line 157). But it still does not get compiled in with the samba binary. Is the nmbd service required in 3.0.24? If so, why is it not built by default? According to the samba spec: The Samba server is made up of the following daemons: nmbd This daemon handles all name registration and resolution requests. It is the primary vehicle involved in network browsing. It handles all UDP-based protocols. The nmbd daemon should be the first command started as part of the Samba startup process. smbd This daemon handles all TCP/IP-based connection services for fileand print-based operations. It also manages local authentication. It should be started immediately following the startup of nmbd. 2. Is it possible that smb.conf isnt configured correctly. This is a snippet of smb.conf from the openwrt router board (/etc/samba/smb.conf) [global] netbios name = openwrt workgroup = openwrt server string = openwrt syslog = 10 encrypt passwords = true passdb backend = smbpasswd obey pam restrictions = yes socket options = TCP_NODELAY unix charset = ISO-8859-1 preferred master = yes os level = 20 security = user guest account = nobody invalid users = root smb passwd file = /etc/samba/smbpasswd [homes] comment = Home Directories browseable = no read only = no create mode = 0750 Has anyone tried samba v 3.0.24 on OpenWRT, and does it work for you? Do you know what the problem could be here and why accessing the share via the Smbclient -L //hostname/share -U <username> command does not work? Thanks Kunal
On Mon, Jun 15, 2009 at 05:16:54PM -0700, Kunal Punjabi wrote:> We have managed to compile samba3 (v 3.0.24 that ships with openwrt/ > kamizake) for our ubicom32 platform and programmed a board with it, > however I am not able to access a samba share on the board. When trying > to access the OpenWRT router (using the smbclient command) I get: > > Error NT_STATUS_CONNECTION_REFUSEDYour smb.conf looks fine. If you get NT_STATUS_CONNECTION_REFUSED, smbd is probably just not running. Please check if port 139 and 445 are listening. nmbd is required for normal operations, but if for testing purposes you connect to that box using the IP address, it is not. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : lists.samba.org/archive/samba/attachments/20090616/fdc07f74/attachment.bin
Thank you, now I can rule nmbd out, at least during testing. I confirmed that samba is not listening on ports 139 or 145, so that must be the problem. /etc/samba # smbd /etc/samba # smbd /etc/samba # netstat -a | grep LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN netstat: /proc/net/tcp6: No such file or directory netstat: /proc/net/udp6: No such file or directory netstat: /proc/net/raw6: No such file or directory /etc/samba # Kunal -----Original Message----- From: Volker Lendecke [mailto:Volker.Lendecke@SerNet.DE] Sent: Monday, June 15, 2009 10:23 PM To: Kunal Punjabi Cc: samba@lists.samba.org Subject: Re: [Samba] Samba 3.0.24 on OpenWRT On Mon, Jun 15, 2009 at 05:16:54PM -0700, Kunal Punjabi wrote:> We have managed to compile samba3 (v 3.0.24 that ships with openwrt/ > kamizake) for our ubicom32 platform and programmed a board with it, > however I am not able to access a samba share on the board. When > trying to access the OpenWRT router (using the smbclient command) Iget:> > Error NT_STATUS_CONNECTION_REFUSEDYour smb.conf looks fine. If you get NT_STATUS_CONNECTION_REFUSED, smbd is probably just not running. Please check if port 139 and 445 are listening. nmbd is required for normal operations, but if for testing purposes you connect to that box using the IP address, it is not. Volker
On Tue, Jun 16, 2009 at 12:53:48PM -0700, Kunal Punjabi wrote:> Thank you, now I can rule nmbd out, at least during testing. I confirmed > that samba is not listening on ports 139 or 145, so that must be the > problem.Try a "smbd -d 10 -i" and paste the output here. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : lists.samba.org/archive/samba/attachments/20090617/5c3f896f/attachment.bin
On Wed, Jun 17, 2009 at 06:25:48PM -0700, Kunal Punjabi wrote:> Thank you for your help so far. > > > > I don't see any output with the "smbd -d 10 -i" command.If there's no output with "smbd -d 10 -i", then you system seems a bit broken to me. It *should* output tons of stuff. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : lists.samba.org/archive/samba/attachments/20090618/f6a08be6/attachment.bin
Trying to send this again because the message was too large last time.. Thank you for your help so far. I don't see any output with the "smbd -d 10 -i" command. However, on a positive note, after doing a "smb -i", samba is now "listening" for requests and I can connect to it from a linux client using smbclient //IPADDRESS/share (and then use get/put to transfer files from the /tmp share) (FYI I had to add "netbios-ssn 139/tcp" to /etc/services And "netbios-ssn stream tcp nowait root /bin/smbd" to /etc/inetd.conf to get it to work.) These are some other related configuration changes: diff --git a/package/samba3/files/samba.config b/package/samba3/files/samba.conf index 3acff5d..780a905 100644 --- a/package/samba3/files/samba.config +++ b/package/samba3/files/samba.config @@ -1,14 +1,14 @@ config samba - option 'name' 'openwrt' - option 'workgroup' 'openwrt' - option 'description' 'openwrt' + option 'name' 'ubicom' + option 'workgroup' 'WORKGROUP' + option 'description' 'Ubicom SaMBa Server' option 'homes' '1' config sambashare option 'name' 'tmp' option 'path' '/tmp' option 'read_only' 'no' - option 'guest_ok' 'no' - option 'create_mask' '0700' - option 'dir_mask' '0700' + option 'guest_ok' 'yes' + option 'create_mask' '0755' + option 'dir_mask' '0755' #option 'users' 'abc' I do have 2 questions: 1. The samba server is only waiting for samba connections if I use the -i (interactive) mode. Any idea how I can get my samba server to listen for and accept requests automatically (in non-interactive mode)? 2. A second related question is, how can I configure mount points and samba shares from the OpenWRT user interface? For example in the UI, I added a /etc mount point, but I cannot access it from my linux smb client (using the smbclient command) the same way I could access /tmp (/tmp was statically configured in package/samba3/files/samba.conf) at build time. Is there something that needs to be done to make it work seamlessly with the OpenWRT User Interface? Or is this question misplaced? : Thanks again. Kunal
The samba server is only waiting for samba connections if I use the -i (interactive) mode. Any idea how I can get my samba server to listen for and accept requests automatically (in non-interactive mode)? I found that smbd -i & (to start the service and put it in the background) seems to work and the server is waiting for incoming connections. Although samba.init contains a command: "smbd -D" in its Start() function, that does not start the service. why do I not need this option under uClinux (smbd -D just seems to work and cause the service to start)? Thanks, Kunal
On Thu, Jun 25, 2009 at 10:50:02AM -0700, Kunal Punjabi wrote:> The samba server is only waiting for samba connections if I use the -i > (interactive) mode. Any idea how I can get my samba server to listen for > and accept requests automatically (in non-interactive mode)? > > > > I found that > > smbd -i & > > (to start the service and put it in the background) seems to work and > the server is waiting for incoming connections. > > > > Although samba.init contains a command: "smbd -D" in its Start() > function, that does not start the service. > > > > why do I not need this option under uClinux (smbd -D just seems to work > and cause the service to start)?Sorry, I have no experience with nClinux. In general, I would strongly recommend using Samba on a CPU with proper memory protection, running without a MMU seems a bit risky to me. The way I would attack this is to run strace -f -o smbd.trace smbd -D and analyze smbd.strace the socket calls like socket(), bind() and listen() for spurious errors. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature Url : lists.samba.org/archive/samba/attachments/20090626/5fc9d0f5/attachment.bin
On Fri, Jun 26, 2009 at 10:19 AM, Volker Lendecke<Volker.Lendecke@sernet.de> wrote:> On Thu, Jun 25, 2009 at 10:50:02AM -0700, Kunal Punjabi wrote: >> The samba server is only waiting for samba connections if I use the -i >> (interactive) mode. Any idea how I can get my samba server to listen for >> and accept requests automatically (in non-interactive mode)? >> >> >> >> I found that >> >> smbd -i & >> >> (to start the service and put it in the background) seems to work and >> the server is waiting for incoming connections. >> >> >> >> Although samba.init contains a command: "smbd -D" in its Start() >> function, that does not start the service. >> >> >> >> why do I not need this option under uClinux (smbd -D just seems to work >> and cause the service to start)? > > Sorry, I have no experience with nClinux. In general, I > would strongly recommend using Samba on a CPU with proper > memory protection, running without a MMU seems a bit risky > to me. >Openwrt is a open source firmware for residential firewall devices en.wikipedia.org/wiki/OpenWrt In this case there are very limited resources. John