Samstag, 16. Dezember 2017, 17:50 UTC+1

Sie sind nicht angemeldet.

  • Anmelden
  • Registrieren

Lieber Besucher, herzlich willkommen bei: NAS Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

AQUAR

Schüler

Beiträge: 100

Wohnort: Australia

1

Montag, 21. Januar 2013, 07:34

Local Area Networking


This article is aimed at people that want to use their MvixBox NAS in a Local Area Network (LAN) that is built around PC's loaded with the Microsoft Windows operating system.

Microsoft has its own LAN software that is, un-surprisingly, called the Microsoft Windows Network. This software is integrated into the windows Operating System (OS) and is just about ready to go out of the box.

Fortunately Microsoft Windows Network is just Microsoft’s version of NetBIOS and CIFS.

CIFS stands for The Common Internet File System, also known as Server Message Block (SMB). It is a Server/Client piece of software with a specific language designed for sharing files from the server PC to the client PC over the LAN..

The information exchange (talk) between the CIFS server and CIFS client is send via the LAN hardware using NetBIOS over TCP/IP.

NetBIOS also provides the means to attach a name to each computer on the LAN.

Setting up simple file shares on our MvixBox is easy, as our OpenWRT firmware comes with NetBIOS, a CIFS server and the Luci Graphical User Interface (GUI) for setting up these file shares.

OpenWRT is a mini Linux OS that uses the ever popular SAMBA software for implementing CIFS and providing a setting for the NETBIOS network name to be associated with the MvixBox.

Part A: Simple File Sharing.

To configure SAMBA for simple file sharing just login to MvixBox with your web browser and navigate to the Samba general settings page (select 'Services' then 'Network Shares').

The process goes like this:

1) Set a NetBIOS name (Hostname) for the MvixBox.

2) Provide some description for the NAS box (Description).

3) Enter a '1' or '0' in the Share home-directories.
A '1' automatically sets up a share to the home directory for each Linux user account.

4) Add a new Shared Directory entry line (Press the Add button) under Shared Directories.

5) Enter a Name in the Name field (Anything) for this share. This name shows up in widows explorer.

6) Add the HDD mount point in the Path field to share the entire HDD (you can change this later).

7) Tick the 'Allow guests' box and leave the other fields empty.

8) Click on 'Save and Apply' to update OpenWRT with these changes.

At this point, under Network in windows explorer, you can see the MvixBox "Hostname" listed and under that the MvixBox HDD share that everyone on the LAN has full control over.

Letting everyone have full control of the NAS HDD is generally not such a good idea, and usually a public folder is created for access by everyone on the LAN.

To do this create a folder called "public" (for example) using windows explorer.
Then add this to the shared directories folder list on a new entry line. The path to this folder is a simply the HDD mount point with /public appended to it. Again tick the 'Allow guests' box and leave the other fields empty.

Whilst the HDD still has guest access it is opportune to create some folders that can later be setup for private user access. For demonstration purposes lets also create a folder called "private" and add it to the shared directories folder list on a new entry line. This time leave the 'Allow guests' box un ticked and leave the other fields empty.

If you try to access this "private" share under windows explorer windows will open up a credentials dialog box requesting the user name and password for this share. Since this isn't yet set we cannot access this share directly (of course you still get to it via the network share that points to the whole HDD).

 
Part B: Restricted File Sharing.

Configuring SAMBA for user restricted file sharing is slightly more complicated.

It must be noted that for Linux the OS user accounts are not used as network user accounts (unlike windows).
So don't bother trying to use any Linux user account (or Windows account) to complete the Windows Credentials Dialog, it wants a SAMBA ACCOUNT.

By example lets configure SAMBA to share the "private" folder only for a user called 'gemini' with associated password "letmein".

A somewhat manual way is:

1) Login to OpenWRT with a Secure Shell program like WinSCP

2) Use the WinSCP shell to navigate to /etc/passwd.
When you open this text file you will see these lines,

root:!:0:0:root:/root:/bin/ash
nobody:*:65534:65534:nobody:/var:/bin/false
daemon:*:65534:65534:daemon:/var:/bin/false

3) Add a new line for the new user as follows.
Choose a user id (the first number in the line) of 1000 or higher that does not exist yet. Set the group identification number (the second number) to the same number as the user nobody. Copy the rest.

gemini:*:1000:65534:gemini:/var:/bin/false

4) On the WinSCP command line execute "smbpasswd newuser password" to add a samba password to newuser e.g.,

smbpasswd gemini letmein


5) In the Luci GUI make sure that guest is not ticked for the "private" share and add the username "gemini" in the allowable users box. As before leave the rest blank (don't forget 'Save and Apply').

6). Now when the Windows Credentials Dialog pops up on accessing the "private" share, enter the username "gemini", the associated samba password "letmein" and click OK (no need to include anything else - like a domain name).

7) This Credentials Dialog pops up every time the "private" share is accessed, unless you store the login information in Windows Credentials vault. Storing is achieved simply by ticking the 'Remember my credentials' on the Windows credentials dialog.

Part C: Miscellaneous.

In the SAMBA general settings page, for each share directory, there is a create mask field for new files and directories. These masks define additional restrictions on new files and directories created under the associated share directory (e.g. preventing file deletion). Details on these masks can be found with a bit of GOOGLING.

OpenWRT on the MvixBox also provides NFS and DLNA as alternative file sharing options. DLNA for streaming movies from the MvixBox works really well with the free home theatre program XBMC. Maybe if there is some genuine interest these services could be fodder for other articles.

Part D: Plea to the GURUS.

Since I am not savvy with either Linux nor Networking, the above article is simply what worked for me. I urge anyone with such expertise to provide constructive and positive feedback to enhance the article.

So GURUS please don't sit on the fence but show us NOOBS how GEEK you really are.

AQUAR