Using Network Attached Storage with Linux. by Andy Pepperdine



Similar documents
Local File Sharing in Linux

SmartFiler Backup Appliance User Guide 2.0

SmartFiler Backup Appliance User Guide 2.1

Remote Unix Lab Environment (RULE)

Extending Remote Desktop for Large Installations. Distributed Package Installs

NAS 109 Using NAS with Linux

Router CLI Overview. CradlePoint, Inc.

SETTING UP REMOTE ACCESS ON EYEMAX PC BASED DVR.

Viking VPN Guide Linux/UNIX

Savvius Insight Initial Configuration

How to Backup XenServer VM with VirtualIQ

How To Use 1Bay 1Bay From Awn.Net On A Pc Or Mac Or Ipad (For Pc Or Ipa) With A Network Box (For Mac) With An Ipad Or Ipod (For Ipad) With The

Laboration 3 - Administration

Tutorial: Using HortonWorks Sandbox 2.3 on Amazon Web Services

First Steps after Installation Guide

EURECOM VPN SSL for students User s guide

FOG Guide. IPBRICK International. July 17, 2013

INSTALLING KAAZING WEBSOCKET GATEWAY - HTML5 EDITION ON AN AMAZON EC2 CLOUD SERVER

Using a login script for deployment of Kaspersky Network Agent to Mac OS X clients

Create a virtual machine at your assigned virtual server. Use the following specs

NAS 221 Remote Access Using Cloud Connect TM

F-SECURE MESSAGING SECURITY GATEWAY

How to enable Disk Encryption on a laptop

Sky Broadband upgrading your router software

Recommended File System Ownership and Privileges

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

RecoveryVault Express Client User Manual

Wolfr am Lightweight Grid M TM anager USER GUIDE


F-Secure Messaging Security Gateway. Deployment Guide

SOA Software API Gateway Appliance 7.1.x Administration Guide

Hands-on MESH Network Exercise Workbook

Secure Network Filesystem (Secure NFS) By Travis Zigler

NAS 224 Remote Access Manual Configuration

This document is intended to make you familiar with the ServersCheck Monitoring Appliance

Online Backup Linux Client User Manual

1. Product Information

Online Backup Client User Manual

Guideline for setting up a functional VPN

Online Backup Client User Manual Linux

Managing Software and Configurations

DiamondStream Data Security Policy Summary

BF2CC Daemon Linux Installation Guide

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

CM1-Mini Wi Drive. Setup Guide Ver 0.1

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Acronis Backup & Recovery for Mac. Acronis Backup & Recovery & Acronis ExtremeZ-IP REFERENCE ARCHITECTURE

How to upload large files to a JTAC Case

Cloud Server powered by Mac OS X. Getting Started Guide. Cloud Server. powered by Mac OS X. AKJZNAzsqknsxxkjnsjx Getting Started Guide Page 1

Note: This case study utilizes Packet Tracer. Please see the Chapter 5 Packet Tracer file located in Supplemental Materials.

How to share folders on Windows 7 and Windows 8

Creating an LDAP Directory

Kwickserver Firewall. Overwiew. Features. Two distinct internal networks. Portfilter. Documentation Version 1.1. Peter Buzanits

Installing Booked scheduler on CentOS 6.5

Step One: Installing Rsnapshot and Configuring SSH Keys

Active Directory Self-Service FAQ

Configuring MailArchiva with Insight Server

Configure NFS Staging for ACS 5.x Backup on Windows and Linux

Setting up VNC, SAMBA and SSH on Ubuntu Linux PCs Getting More Benefit out of Your Local Area Network

Securing your Linksys WRT54G

Configuring the Edgewater 4550 for use with the Bluestone Hosted PBX

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

I N S T A L L A T I O N M A N U A L

SUSE Manager in the Public Cloud. SUSE Manager Server in the Public Cloud

Navigating the Rescue Mode for Linux

CycleServer Grid Engine Support Install Guide. version 1.25

Upgrading Software Using the Online Installer

Instructions for Adding a MacOS 10.4.x Server to ASURITE for File Sharing. Installation Section

Remote Access to Unix Machines

INASP: Effective Network Management Workshops

WS_FTP Server. User s Guide. Software Version 3.1. Ipswitch, Inc.

How to install PowerChute Network Shutdown on VMware ESXi 3.5, 4.0 and 4.1

Syncplicity On-Premise Storage Connector

ShadowControl ShadowStream

Cloud Services. Sharepoint. Admin Quick Start Guide

Parallels. for your Linux or Windows Server. Small Business Panel. Getting Started Guide. Parallels Small Business Panel // Linux & Windows Server

How To Set Up A Backupassist For An Raspberry Netbook With A Data Host On A Nsync Server On A Usb 2 (Qnap) On A Netbook (Qnet) On An Usb 2 On A Cdnap (

WEBTITAN CLOUD. User Identification Guide BLOCK WEB THREATS BOOST PRODUCTIVITY REDUCE LIABILITIES

Online Backup Client User Manual

Common Services Platform Collector 2.5 Quick Start Guide

Centralized Mac Home Directories On Windows Servers: Using Windows To Serve The Mac

File Transfer Examples. Running commands on other computers and transferring files between computers

Freshservice Discovery Probe User Guide

EZblue BusinessServer The All - In - One Server For Your Home And Business

Enterprise Apple Xserve Wiki and Blog using Active Directory. Table Of Contents. Prerequisites 1. Introduction 1

A SHORT INTRODUCTION TO DUPLICITY WITH CLOUD OBJECT STORAGE. Version

File Manager User Guide

Configuring your network settings to use Google Public DNS

Allion Ingrasys Europe. NAStorage. Security policy under a UNIX/LINUX environment. Version 2.01

How to setup camera with NAS

Cloud Backup Express

More about Continuous Integration:

Oracle security done right. Secure database access on the (unix and linux) operating system level.

VPN Overview. The path for wireless VPN users

Mobile Device Management Solution Hexnode MDM

Massey University Follow Me Printer Setup for Linux systems

WD My Cloud EX4 Personal Cloud Storage Release Notes for Firmware

SAS3 INSTALLATION MANUAL SNONO SYSTEMS 2015

Transcription:

Using Network Attached Storage with Linux by Andy Pepperdine I acquired a WD My Cloud device to act as a demonstration, and decide whether to use it myself later. This paper is my experience of how to use it from a Linux system (Mint 17 Mate). Introduction Network Attached Storage (NAS) is the name for a device that you plug into your local network and can access from any other device on the network. In principle, you could also access it from the wider Internet, but for this demonstration, I will not consider that case. The WD device is small, quiet and uses little power ideal to place next to your router out of the way, and connect it directly to the router via one of the routers ethernet ports. It runs Linux itself, and WD will supply the source code on request, something to check with any other such device. However, there is no encryption on it by default, so if the device gets stolen, the drive could be removed, inserted into another machine and read. Access to the various data can be controlled by passwords, however, so separation by user is possible. There is a public area that anyone can access. Other private areas are created when accounts for users are created on the device. For this paper, I am not going to change the default settings for names in order to make it clear what is going on. I would recommend that you should change such things to better suit your environment and make them less likely to conflict with anyone else. Other devices are available, and I suspect they have similar features. Read the manual. Methods of access Files on the NAS can be seen from Windows via Windows normal sharing features, and the manual contains full descriptions of how to do that. They can be seen from an Apple device by a standard means, and again the manuals tell you what you need to know. WD provide downloadable applications for each of Apple and Windows to give natural access to the remote device. Those cases are provided with good support and full documentation "out of the box", but I have not been able to test as expected. For Linux, there is no explicit support. However, it is possible to see the Windows shares via Samba, the Linux interface to Windows networks. It is also possible, after some work, to set it up so that access can be made to NFS shares as the normal Unix method of sharing over a network, and that is what this paper is primarily about. Nas.odt edited: 2015-05-28 Page 1 / 6

Warning! If you use the Samba share method with Linux be very careful how you name your files to be placed on the NAS. Files with names containing a colon (:) may not be addressed correctly, and may create files that cannot be deleted, accessed, or renamed through the Samba route. This caused me some considerable problems initially, but fortunately I found it early enough so that there was only test data on the NAS and it was possible to do a machine reset, deleting all data, and not lose much. Preparation This is easy, just plug it in and it takes about three minutes to boot up first time. The simple settings and manipulation are through what they call the dashboard, and that is seen via any internet browser by pointing it at the correct IP address on your local network. To see where it has been placed, you could find out by looking in your router connection list, but that is probably a last resort. A more likely method, assuming a sane router, is to put the url wdmycloud.local into the url field of your browser. If you need the actual IP address later, then another method is to open a terminal window and use the command ping wdmycloud.local then look at the output produced. A similar method would work for other devices see your documentation. For more complex settings, you will have to remotely login to the device via secure shell, ssh. As a general point, the recommended way to obtain the IP address of a Linux machine on its local network is issue the command: hostname -I so, you can use this after you have logged in to the WD device to ensure you get the correct address. For NFS access to the shared data, you must know its IP address. Setting up user and share We will follow the instructions in [1], which are very clear and I will not repeat most of them. But it is worth reiterating something. When logging on first with ssh, using the command in a terminal window: ssh root@wdmycloud.local it will ask you whether you want to continue as the authenticity cannot be verified. Answer Yes in order to continue. It will then prompt you for the root password (the default currently is welc0me). As soon as you have negotiated this, change the password to something more secure. Note that logging on to the root user will give you untrammelled access to everything. The admin user which you normally see on the dashboard will provide access to the essential parts of the file system operations, but not to the whole system. Nas.odt edited: 2015-05-28 Page 2 / 6

So when logged in as root, you need to be exceptionally careful what you are doing. Mistakes could completely ruin the device. To change the password, after logging in via ssh issue the command: passwd and follow the prompts. Fortunately, by default the set up does not allow access from the Internet, only from the local network, so you have time to change the password before opening up the device to the whole world. If you do allow access to files from everywhere, make sure you choose a strong root password. Access permissions The way NFS is set up on the device is that permissions are handled by matching the UIDs of users on each of the machines. So if the UID on your laptop for your user is, say, 1001, then so must the UID be on the WD device. To find your UID on any machine, run the command: id -u and note the resulting userid. Unfortunately, the WD starts numbering at 1001, and Mint starts at 1000. It is easier to change the WD device to match than your working machine, since initially there will be no files on the WD device whose ownership ID has to be changed. So as soon as you have created a user on WD, change its UID by starting an ssh connection and do the following: Get the current UID, and see if it needs changing (username is the name of the user whose UID needs to match): id -u username and note the value oldid. Make sure you do this so that you know what has to be changed elsewhere in the system. Then change it to the desired value: usermod -u userid username Where userid is the value you want it to be. If you have any files owned by this user, then you should change the ownership ID on all of the files: cd / find. -uid oldid -exec chown userid {} \; where oldid is what it was, and userid is what you want it to be. If you have only just created the user or share, there will be no files that need modifying. Nas.odt edited: 2015-05-28 Page 3 / 6

Access the shared data from a client Now that you have the device set up, we have to get to the data from another machine, and in Linux that might mean some changes to the configuration. Here are some things to look out for and which you may forget if you haven't recently changed it. First, make sure that you allow the device to see you. If you have changed the file /etc/hosts.allow, then make sure that your device is allowed, e.g. by adding the line: ALL: 192.168.0.11 Put the actual IP address of your device in here. You will also need to ensure that the /etc/default/nfs-common file contains the line: NEED_STATD=yes Preparing the mount points You will need dummy directories on your client machines to mount the shared data from the device on. I created directories under the /home area to match each of the nfs shares I wanted, like this: sudo mkdir /home/nas /home/nas/public Because these are publicly available, I set the access on that directory open: sudo chmod 777 /home/nas/public Mounting the shared area This is done via a mount command: sudo mount.nsf4 -o udp,vers=3,soft,intr,rsize=8192,wsize=8192 \ 192.168.0.11:/nfs/Public /home/nas/public Now you can test that you can see the public area through the directory /home/nas/public and create files and read them again. Mounting on start up It is not really convenient to have to manually mount every time you boot up, but there is a way of making the mount happen automatically by editing the /etc/fstab file on the client by adding the line: 192.168.0.11:/nfs/Public /home/nas/public nfs4 \ _netdev,vers=3,user,rsize=8192,wsize=8192 0 0 The _netdev option will stop it trying to contact the device if there is no network available. The user option will allow any user to mount the shared data instead of restricting it to the superuser. Nas.odt edited: 2015-05-28 Page 4 / 6

Getting to your own private shared data First create a mount point as for Public, for example at /home/nas/andy by creating that directory. By placing a similar line to the Public line in /etc/fstab for the private share, then the user can mount his/her private share simply by issuing the command: mount /home/nas/user and the parameters will be picked up from the /etc/fstab file. Such a command can then be inserted into the user's.profile file in order to give immediate access after logging in. If you want the mount of a user's area to be performed only when the user logs in, and not at start up, then make the /etc/fstab line look like this: 192.168.0.11:/nfs/andy /home/nas/andy nfs4 \ _netdev,noauto,vers=3,user,rsize=8192,wsize=8192 0 0 The noauto option will suppress the automatic mounting on start up. Instead, you can include in the user's.profile file in the home directory, the lines: if! mountpoint -q /home/nas/andy; then mount /home/nas/andy fi which will mount the user's NAS area if it is not already mounted. Non-local access If you want to get to your device from outside your home, then there are a number of things to be aware of and to check. I have not yet tried any of this, so these are just points to remember. First, ensure that your ISP will allow incoming signals to your home router. Several do not, since they do not want your line to be used by a server. In some cases, they restrict only certain types of signals, others will disallow all of them. So check. Second, ensure that your router can pass through the relevant request signals by mapping a router port to your device, and make the necessary changes. Third, follow the manual instructions to turn on access from the Internet. I would be interested in any efforts to do this and the results. Encryption The WD device comes with no encryption features, so all the data stored will be visible by any thief who takes the whole device and removes the disk to read it. On Linux, it is possible to create an encrypted file system on top of the nfs shares, and so you can keep your secrets with your own locks. Apple may have similar features, but I do not know about Windows. Nas.odt edited: 2015-05-28 Page 5 / 6

References [1] To set up NFS access, follow the instructions at the two urls below: http://ubuntuforums.org/showthread.php?t=2247237 http://ubuntuforums.org/showthread.php?t=2247242 Nas.odt edited: 2015-05-28 Page 6 / 6