I want my Ubuntu media server to be able to push content to my WD TV Live, which I use to view content on my TV. My WD TV Live is on my wireless network, but I found that the network is not fast or reliable enough to stream 1080p content, or even 720p content under certain conditions. For this reason, I purchased a flash drive to act as local storage on the player, and enabled file sharing on it. I wish to push content from my media server to it (manually or with Bash scripts), so I decided to mount it to my server’s file system using smbfs, the Samba file system package. To make it easier to mount the shares, I first set up the server to allow the use of Windows host names to identify file shares.

Doing so is quick but not entirely intuitive.

Install WinBind

First, you will need winbind installed. It is one of Ubuntu Lucid’s default packages, so I did not need to install it. If don’t have that package installed for some reason, simply run:

$ sudo apt-get install winbind

Edit Name Server Switch Configuration

Next, edit the name server switch configuration file, which lists the databases the networking interface will use to resolve host names.

$ sudo nano /etc/nsswitch.conf

Under the “hosts” heading, add “wins” prior to “dns”. my file looks like this:

hosts:          files wins dns

Restart Networking

Finally, restart networking. I found that I could do this even while logged in under SSH.

$ sudo /etc/init.d/networking restart

After that, you’ll be able to use host names to connect to Windows/Samba shares.