A note about WDTV Live and Samba shares

I recently blogged about Western Digital’s new WD TV Live Media Streamer.

It’s going great guns, but I had some difficulty setting up Samba shares on my Linux server, and seeing these shares from the WD TV Live.

“Samba” is an implementation of the Server Message Block (SMB) networking protocol. Samba shares look like Windows shares to a Windows workstation, and behave the same way. Samba can also be setup to do clever things like emulate a Windows Primary Domain Controller, so the Windows workstations on the network think they’re talking to a Windows PDC, when in actual fact they’re talking to a Linux system emulating a PDC, providing enormous flexibility and saving thousands of dollars in Microsoft licensing.  Pretty cool, huh?

But I digress.  At home, I have a Windows workgroup. I also have a Linux server running Fedora 9 which I use for my internet gateway, firewall, DHCP, Network Address Translation (NAT) and other stuff. For most people, all this stuff is done by their ADSL router or similar device. But I’m not like normal people. And I’m running a business from home and I need the flexibility which a Linux server affords.

I wanted to have all my media on an external (portable) drive, connected to the Linux server, which is always on. Then I wanted to “share” this drive on the network, so I could access it from the new WD TV Live.

This is not a tutorial in connecting USB devices and mounting external drives in Linux. Also, this isn’t a tutorial in setting Linux file and directory permissions. For help doing that, you’ll need to hit Google.

Anyway, my new drive was mounted in my Linux file system at “/home/ron/elements”. (Co-incidentally it’s a Western Digital ‘Elements’ external hard disk.) I didn’t have Samba installed, so I installed it like this:

yum install samba

“Yum” is the Yellow-Dog Updater which is an easy and safe way to install commonly-used Fedora packages via the internet. I added my username “ron” to the SMB users’ file, like this:

/usr/bin/smbpasswd -a ron

…and added a new, browsable share in the Samba config file, like this:

[elements]
comment = WD Elements Share
path = /home/ron/elements
public = yes
writable = yes
createmask = 0777
directorymask = 0777
browseable = yes
printable = no

Then I started Samba, and added it to the correct startup runlevels like this:

service smb start
service nmb start
chkconfig smb on
chkconfig nmb on

All good! I could see the share by browsing on a Windows machine to the IP address, like this:

192.168.2.2elements

…BUT a hit a brick wall at this point.  There were two problems which I couldn’t resolve. The second, I suspected, was directly related to the first:

  1. I couldn’t browse the machine by its NetBIOS name, “derek”, which I’d specified in the smb.conf file, and
  2. The WD TV Live couldn’t see the Samba share.

Graeme Callaghan helped me over this hurdle; with another 5 minutes fiddling, I had the problem solved.

Graeme’s Fix for Samba – NetBIOS problems – don’t forget your DHCP daemon!

There were two settings in the Samba config file which I had left as the default, being “remmed out”.  These were:

wins support = yes
dns proxy = yes

I un-remarked these.

Then, I un-remarked a critical setting in my DHCP server’s configuration file, which was also on the same machine:

option netbios-name-servers  192.168.2.2;

This setting controls NetBIOS name visibility on your network. If your Samba server is on a different physical machine, point the IP address in your DHCP config file to the Samba machine’s IP address.

Then I restarted dhcpd, smb & nmb. Low-and-behold, my Fedora server was suddenly browsable by its NetBIOS name; e.g.

derekelements

Even better, The WD TV Live picked up the changes straight away.  The server “DEREK” was now available in my list of “Shared Folders” on the WD TV Live menu.

I needed to *turn off* a setting in the WD TV Live called Settings / Network Setting / Auto login to network share. Then I browsed to DEREK in the Video / Shared Folders list, entered my network credentials (which I had created earlier with the “smbpasswd” command) and verified I could see all the folders correctly and access the media OK. I then reset the Auto login to network share to ON so I wasn’t prompted for a username and password every time I tried to access this network resource.

There seems to be a lot of consternation on message boards about WD TV Live connecting to Samba shares. It’s easy when you know how (thanks again Graeme). Hopefully this is useful to someone.

For info, package versions are:

  • samba-3.2.11-0.28.fc9.i386
  • dhcp-4.0.0-22.fc9.i386
Add Comment Register



Leave a Reply