Setting up an off grid server, part 2. File Sharing

Today, we’re going to continue setting up the Panda for a perfect home server. The next thing to tackle is storage. Since the Panda doesn’t have anything in the way of mass storage connections, I used 1 TB Western Digital External USB drive which we picked up for $60 as a black friday sale. Did I mention that my wife loves Black Friday shopping? There are same great tech deals to be had too!

We start by plugging in both the Panda and the HD, and connecting the USB cable between them, paying attention to the new drive’s node in /dev. It’s /dev/sda1 for me. Next, we create a directory to be the mount point and set it up in fstab.

sudo mkdir /var/samba/root
sudo nano /etc/fstab

And add the line…

/dev/sda1 /var/samba/root vfat rw,users,umask=0 0 0

At this point, we do a quick reboot to make sure that the drive is mounted properly on startup. Once it is back up, running mount should show the drive. Now we have 1TB of space for all of our movies, TV and music, but what good is it if we don’t share? For my purposes, I’m using Samba to share the files as a windows network share. I could also use NFS, but I also want to share with my wife’s windows laptop and setting up a NFS client on windows is difficult last time I tried. In a future article, I’ll set up ftp as a fall back.

Thankfully, it’s not so hard to setup

sudo apt-get install samba
sudo nano /etc/samba/smb.conf

and the file contents

# Global parameters
workgroup = WAGNERNET
server string = Samba Server
security = share
map to guest = Bad User
admin log = Yes
preferred master = yes
domain master = yes
dns proxy = no
guest account = root
printer admin = root
printing name = cups
cups options = "raw"
client ntlmv2 auth = yes
restrict anonymous = no
client plaintext auth = yes
client lanman auth = yes
update encrypted = yes
null passwords = yes
max protocol = NT
acl compatibility = winnt
ldap ssl = No
server signing = Auto

path = /var/samba/root
force user = root
force group = root
read only = No
guest only = Yes
guest ok = Yes

This basically creates a samba server instance, with security setup on a per share basis. It setups a single share, allows only “guest” users to access it (no sign in by the end users), and insures that all file system access in Linux is as the same user (root in my case).

That’s it for now. I also been setting up MPD to make it work as a smart radio and working on the Panda house, but that will be posts for another day. Laters!


About Grant Wagner

General class ham: KC9SJQ
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s