Category:2big Network

Steppenwolf's Hacking HOWTO
Steppenwolf has an excellent HOWTO on his blog. It is in Italian unfortunately but Google Translate does a great job.

What will follow now is a copy of his Google Translated blog post to preserve it, should it ever be taken offline, and to provide the NAS-Central users with as much info as possible.

This definitely needs to be reviewed and gramatically corrected!

General Information
The goal of this post is to add a shell ssh daemon ntpd to your nas, but before doing so it is good to understand a little machine with which we deal. The LaCie 2big Network nas taken as reference and on which was performed this procedure has the official firmware, distributed by LaCie, updated to version 2.2.3.

Processor      : ARM926EJ-S rev 0 (v5l) BogoMIPS       : 266.24 Features       : swp half thumb fastmult edsp CPU implementer : 0x41 CPU architecture: 5TEJ CPU variant    : 0x0 CPU part       : 0x926 CPU revision   : 0 Cache type     : write-back Cache clean    : cp15 c7 ops Cache lockdown : format C Cache format    : Harvard I size         : 32768 I assoc        : 1 I line length  : 32 I sets         : 1024 D size         : 32768 D assoc        : 1 D line length  : 32 D sets         : 1024 Hardware       : Feroceon Revision       : 0000 Serial         : 0000000000000000
 * 1) cat /proc/cpuinfo

Linux version 2.6.22.7 (root@grp-dash) (gcc version 4.2.1) #1 Thu Apr 9 16:07:45 CEST 2009
 * 1) cat /proc/version

total   used    free    shared    buffers Mem:   61952    60184   1768    0         7384 Swap:  128376   60184   0       128376 Total: 190328   130144
 * 1) free

Filesystem Size    Used    Available    Use%    Mounted on rootfs      648.4M  20.2M   595.3M       3%      / udev       648.4M  20.2M   595.3M       3%      /dev /dev/md0   7.5M    5.9M    1.2M         83%     /oldroot udev       10.0M   0       10.0M        0%      /oldroot/dev udev       10.0M   0       10.0M        0%      /oldroot/dev none       30.3M   0       30.3M        0%      /oldroot/dev/shm /dev/md1   167.0M  111.3M  47.1M        70%     /oldroot/var/original /dev/md2   648.4M  20.2M   595.3M       3%      /oldroot/snapshots unionfs    648.4M  20.2M   595.3M       3%      / /dev/md4   930.4G  1.2M    930.4G       0%      /home
 * 1) df -h

major minor #blocks  name 8    0  976762584 sda 8    1          1 sda1 8    2  975755970 sda2 8    5     128457 sda5 8    6       8001 sda6 8    7       8001 sda7 8    8     176683 sda8 8    9     674698 sda9 8   10       8001 sda10 8   16  976762584 sdb 8   17          1 sdb1 8   18  975755970 sdb2 8   21     128457 sdb5 8   22       8001 sdb6 8   23       8001 sdb7 8   24     176683 sdb8 8   25     674698 sdb9 8   26       8001 sdb10 31   0        512 mtdblock0 9    0       7936 md0 9    1     176576 md1 9    2     674624 md2 9    3     128384 md3 9    4  975755904 md4
 * 1) cat /proc/partitions

dev:   size   erasesize  name mtd0: 00080000 00010000 "cfi_flash_0"
 * 1) cat /proc/mtd

In short, it is a Linux operating system with a very dated (sic) kernel compiled for ARM processor architecture, 400mhz cpu, 64mb of ram (the new models have 128 MB of RAM) and bootloader uboot. From the limited information obtained from the official site scratcbox seems to have been used to build the system and starting services and daemons uses initng instead of init.d. The problems that arise are plenty: the retrieval of software already compiled for the system (unless you jump headlong into cross-compiling) compatible with the versions used by the library and the creation of nas startup scripts for initng. The scripts for initng found on the internet must be modified slightly to make them work on the system, given that developers have not complied fully with the specifications initng to include all the *. script in the folder /etc/initng/ without performing the division in subfolders (daemon for demons, net for network services, etc.)

Hacking
Disclaimer: I do not assume any responsibility if, following the changes made, your system stops working properly. I remind you also that any software or hardware changes to the system will void the warranty by the manufacturer.

Access to the system is crucial to add to our nas a bash script that executes commands at will (webshell) or, preferably, an ad hoc script to start the telnet service and have a root console remote. There are several ways to "pierce" your nas, in fact, depending on the services started on the machine the safety of this object is far down the drain. A very simple way to access the system without physically removing disks is to create a new share with a particular path. (See below) You will have access to the entire system with administrator privileges since the webserver has the nas as root.



The counterpart of this hack is that the machine is rebooted, the share created by the system is changed (security mechanism?) And redirected into your root share, forcing them to have to re-apply the 'patch' whenever you feel the need to access the your Linux system. Even the removal of the new share is to be performed with extreme care. My suggestion is to remove this share once it has nas were uploaded on the telnet daemon and its startup files (see below).

Hacking through the creation of a new share
Create a new share on your NAS called "Hack". The path of the share is not important what is important is that you enable at least sharing http. Save the xml configuration of your NAS disk (System-> Maintenance-> Save Configuration) Make a backup copy of the file you just saved (Fatelo! you will need it later to put things in order). Edit the file downloaded xml configuration changing the path of sharing "Hack" as shown:



Keep in mind the lines of the code of your xml files can be different than shown above, in relation to the number of shares of your machine, by users and groups.


 * Save your changes and upload the new configuration on the NAS (System-> Maintenance-> Download the configuration)
 * Use your browser and access the administration page of nas and click Browse to navigate to the new share on the web.

The magic is performed by line ../../../../ which requires the system to create a new share from the root. If you try to unshare "hacks" do harm to your system, it also will remove together with shared files in it (so the operating system of the NAS). A painless way to make the removal of the load sharing is the backup configuration previously done nas (edconf.xml) and only after unshare 'hack' normally through the web interface.

Once you have access to the filesystem, for more with root rights (!), You can upload all the files you want.

Binaries compiled for ARM architecture, and configuration files for pam and initng
From here on, you will need this file:

>> LaCie_2Big_Network_TELNET-NTP-SSH-CUPS.zip (6.79 Mb)

containing all the binaries and libraries, compiled for the ARM architecture, you need to install on your nas demons Telnet, NTP, OpenSSH and Cups. The archive contains the following files:


 * cups-1.3.8-r1.tbz2 (1.89 Mb), containing all files of the print service. is included in the archive library also libpaper ( libpaper-1.1.23.tbz2 ) required by the cups and not found in nas.
 * cups-1.3.8-r1_(driver).tbz2 (3.74Mb), containing all ppd in the deployment of ubuntu 9.10. This file, of course, is not on the website where I recovered the compiled binaries for the nas.
 * cups-1.3.8-r1_(language).tbz2 (419KB), containing the translation in all major languages, including Italian, html pages cups. This file is not on the website where I recovered the compiled binaries for the nas.
 * ntp-4.2.4_p4.tbz2 (247KB), containing the binaries and configuration files for the NTP daemon
 * openssh-4.7_p1-r6.tbz2 (490Kb), containing the binaries and configuration files for the ssh daemon. The archive also contains the libraries tcp-wrappers ( tcp-wrappers-7.6-r8.tbz2 ) required by the daemon is not present in nas.
 * usbutils-0.73.tbz2 (86.2 Mb). This file is not necessary to install nas it is required to run cups, however, can help by installing the executable lsusb.
 * utelnetd.tbz2 (5.7Kb), containing the demon utelnetd and a file to run (see next paragraph for more info)

The original files I have recovered from the site:

http://downloads.buffalo.nas-central.org/LSPro_ARM9/Distributions/Genlink/Binaries/armv5tejl-softfloat-linux-gnueabi/

where there are many pre-compiled packages for the buffalo nas. Except that these packages are designed for a system that uses no inet.de initng, so I had to create my hand the scrip to start sshd, ntpd and cups (respectively /etc/initng/sshd.i, /etc/initng/ntpd.i and /etc/initng/cups.i ). I can assure you that it was not a pretty sight: the documentation is somewhat lacking and on the official forum of the project initng is overwhelmed by spam. (How I love spammers : Evil: )

I wanted to leave separate packages, avoiding to make a single archive, so that you have the greatest choice of what to install. From the files I removed the man page and docs.

Add telnet to NAS
The archive utelnetd.tbz2 contains two files, the telnet daemon and a file to launch it and configure the bash on your system. Copy the two files in the folder /www/cgi-bin/public/ previously created through the sharing. Here is the contents of the file telnet.cgi:

echo "Content-type: text/plain" echo "" HOME='/root' PATH='/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:.:' TERM=linux PS1='\u@\h:\w# ' PS2='> ' PS3='> ' PS4='+ ' export PS1 PS2 PS3 PS4 PATH HOME TERM echo utelnetd -l /bin/bash eval utelnetd -l /bin/bash
 * 1) !/bin/sh
 * 1) Settings for root bash shell
 * 1) Run telnet daemon

You can launch your telnet daemon from a web browser at:

http:///cgi-bin/public/telnet.cgi

If the page is white and not worry infinite load, run telnet client can also list your address of nas and enjoy your root console without login. (Hooray safety!) Once you have a console at all the effects you can even think about making a step forward with installing openssh security.

Installing OpenSSH
Copy the file openssh-4.7_p1-r6[modificato].tbz2 in your shared folder on the NAS. From the console, telnet performed:


 * 1) cd /home/share/folder_name_of_your_share
 * 2) tar -xvjf openssh-4.7_p1-r6.tbz2 -C /
 * 3) rm openssh-4.7_p1-r6.tbz2
 * 4) cd /etc/initng/runlevel/
 * 5) echo sshd >> default.runlevel
 * 6) touch /var/log/lastlog

At first startup after installation of ssh nas will, for once, the slower, the cause is the automatic creation of files:

ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_key ssh_host_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub

required for the operation of the ssh daemon itself (folder /etc/ssh/ ).

Here is the configuration file ( sshd.i ), included in the archive for initng for the sshd daemon:

service sshd/generate_keys { env KEYGEN=/usr/bin/ssh-keygen; env RSA1_KEY=/etc/ssh/ssh_host_key; env RSA_KEY=/etc/ssh/ssh_host_rsa_key; env DSA_KEY=/etc/ssh/ssh_host_dsa_key; script start = { [ ! -s ${RSA1_KEY} ] && \ ${KEYGEN} -q -t rsa1 -f ${RSA1_KEY} -C  -N  2>&1 if [ ! -s ${RSA_KEY} ] ; then ${KEYGEN} -q -t rsa -f ${RSA_KEY} -C  -N  2>&1 chmod 600 ${RSA_KEY} chmod 644 ${RSA_KEY}.pub fi    if [ ! -s ${DSA_KEY} ] ; then ${KEYGEN} -q -t dsa -f ${DSA_KEY} -C  -N  2>&1 chmod 600 ${DSA_KEY} chmod 644 ${DSA_KEY}.pub fi  } } daemon sshd { need = bootmisc virtual/net mountfs; pid_file = /var/run/sshd.pid; need = sshd/generate_keys; exec daemon = /usr/sbin/sshd -D; daemon_stops_badly; respawn; }
 * 1) !/sbin/itype
 * 1) NAME: OpenSSH
 * 2) DESCRIPTION: The standard Linux SSH server
 * 3) WWW: http://www.openssh.com/

Another problem is the pam, even here, the file listed in the original does not work and I had to edit it by hand. Here's the new content:

auth       required     pam_unix.so account     required     pam_unix.so password    required     pam_unix.so session     required     pam_unix.so
 * 1) %PAM-1.0

Modify it to your discretion (file /etc/pam.d/sshd ).

Persistence of user privileges
The problems do not end there, however. At each restart of the machine the file /etc/passwd and /etc/shadow is overwritten. In particular, each new user created through the web interface of the NAS does not have the right to log into the remote console nas. Ex:

admin:x:500:100::/home:/bin/false

The /bin/false is our problem! To remedy the situation I created a service for initng called personal, which allows you to restore the privileges of an account:

# service personal { need = edconfd/ready; last; script start = { user="utente" PASSWD="$user:x:0:0::/root:/bin/bash" if [ "x`cat /etc/passwd | grep $user`" == "x" ]; then echo $PASSWD >> /etc/passwd echo "Insert user $user done" >&2 else LINE="`cat /etc/passwd | grep $user`" if [ "$LINE" != "$PASSWD" ]; then sed -i "s#${LINE}#${PASSWD}#g" /etc/passwd echo "User $user restored" >&2 fi    fi     exit 0 }; }
 * 1) !/sbin/itype
 * 1) Cambiate la riga user="utente" inserendo a posto di 'utente' il nome dell'utente da voi creato

It is assumed that the user has been previously created using the web interface of nas.

The only change required is to change the string user="utente", instead of entering the user name of the user you created. The script involves changing the privileges of the user (which will become an alter ego of the root) and the ability to remotely log into the ssh shell. The file is not present in any archive, but you can download it here:


 * personal.i (first version)
 * personal2.i (version for savvy)

To start automatically at boot script to copy the file nas personal.i in the folder /etc/initng/ and run:


 * 1) cd /etc/initng/runlevel/
 * 2) echo personal >> default.runlevel

Once the script has been added you can finally get rid of your telnet daemon and its startup files from the folder /www/cgi-bin/public/. For good luck I suggest you reboot the machine and make sure everything works as you wait for us to remove the first two rows.

Problems with passwd and up and customizing of the bash promtp
When developers have completed the system of LaCie have left out, deliberately I think, something ... Login as root and run the nas (remember telnet access you have is the root):


 * 1) vi /etc/busybox.conf

Put these lines, save the file and exit the editor

[SUID] passwd = ssx 0.0 su = ssx root.0

From the console, always with the root account, run these commands:


 * 1) chown 0.0 /etc/busybox.conf
 * 2) chmod 600 /etc/busybox.conf
 * 3) chown 0.0 /bin/busybox
 * 4) chmod 4755 /bin/busybox

The problems of and passwd are over.

If you want the extended prompt of bash I recommend editing the file /etc/profile.bash change the line:

PS1='[\u@\h \W]\$ '

in

PS1='[\u@\h \w]\$ '

Installing NTP
Copy the file ntp-4.2.4_p4.tbz2 (247KB) in your shared folder on the NAS. From the console, with the active root privileges, run:


 * 1) cd /home/share/folder_name_of_your_share
 * 2) tar -xvjf ntp-4.2.4_p4.tbz2 -C /
 * 3) rm -r ntp-4.2.4_p4.tbz2
 * 4) cd /etc/initng/runlevel/
 * 5) echo ntpd >> default.runlevel

This here is the configuration file, included in the archive for initng for the ntpd daemon:

daemon ntpd { env NTPD_PID = /var/run/ntpd.pid; need = bootmisc virtual/net; require_network; exec daemon = /usr/sbin/ntpd -c /etc/ntp.conf -p ${NTPD_PID}; forks; pid_file = ${NTPD_PID}; respawn; }
 * 1) !/sbin/itype

Do not forget to properly configure your time zone. You can do it from the web page configuration "system" of your nas. Finally reboot the NAS.

Installing CUPS (print server)
Copy the file cups-1.3.8-r1.tbz2 (1.89Mb) in your shared folder on the NAS.

From the console, with the active root privileges, run:


 * 1) cd /home/share/folder_name_of_your_share
 * 2) tar -xvjf cups-1.3.8-r1.tbz2 -C /
 * 3) rm -r cups-1.3.8-r1.tbz2
 * 4) cd /etc/initng/runlevel/
 * 5) echo cupsd >> default.runlevel

Open the web interface of the NAS and click Groups and then add, and create a new group named "lpadmin" group and add the user that you created earlier to access the NAS through ssh.


 * 1) vi /etc/sysconfig/modules

Add a line usblp, as shown and saved.

File /etc/sysconfig/modules

The last step requires the system to load automatically when the module that supports printing to USB port. Remember that the commands for editing a file with the vi editor is the "i" to insert new text, and "ESC" + ": wq" to save and exit.

Here is the configuration file, including archive, to automatically start the daemon via cups initng:

daemon cupsd { need = bootmisc dbus virtual/net avahi; require_network; exec daemon = /usr/sbin/cupsd -F -c /etc/cups/cupsd.conf; }
 * 1) !/sbin/itype
 * 1) NAME: CUPS
 * 2) DESCRIPTION: The Common Unix Printing System
 * 3) WWW: http://www.cups.org

You must also edit the file /etc/cups/cupsd.conf to allow remote administration of the cups, or inactive. To help you carry my configuration file. For further help on how to configure the cups I refer you to the official website www.cups.org.

Even for cups I had to edit the pam file by hand. Here's the new content:

auth       required     pam_unix.so account     required     pam_unix.so
 * 1) %PAM-1.0

Modify it to your discretion (file /etc/pam.d/cups ).

Once rebooted, the cups will be running and is accessible at port 631 of your nas:

https://:631

The files cups-1.3.8-r1_(driver).tbz2 and cups-1.3.8-r1_(launguage).tbz2, are optional and contain the drivers and the translation of the web, install them or not is your choice. You can also install only the Italian language from the archive by removing cups-1.3.8-r1_(launguage).tbz2 the language folders you do not want, the same applies to the file with the drivers.

To print in raw form (pre-formatted output) must uncomment the following line from the file /etc/cups/mime.convs :

application/octet-stream application/vnd.cups-raw 0 -

Make sure also not commented the following line of the file /etc/cups/mime.types :

application/octet-stream

In linux the printer will be found at (watch at times there is no need to specify the port number):

ipp://indirizzo_nas:631/printers/nome_stampante

Ex:

ipp://192.168.1.100:631/printers/ML-3050

In Windows XP click on "Add Printer" and to add a new network printer and select "printer on the Internet or on your home or business" and use the URL:

http://:631/printers/nome_stampante

Select, finally, the driver for your printer. A small clarification, the samba of NAS has not been compiled with support for the cups. ( libcups.so.2 )

Restoration
You can restore the previous state of the NAS file system changes by updating the firmware, even with the same version installed on the NAS, in my case 2.2.3, using the utility from LaCie same provision. However you can not do this if the NAS is no longer visible on the network, because the utility does not perform the upgrade process if you do not see the above nas.

Links

 * uboot
 * scratcbox
 * buildroot
 * www.initng.org, preferably see.
 * http://downloads.buffalo.nas-central.org/LSPro_ARM9/Distributions/Genlink/Binaries/armv5tejl-softfloat-linux-gnueabi/ (Binaries compiled for ARM)
 * LaCie (support page)
 * LaCie LPG
 * www.cups.org, Common Unix Printing System.

Speculations
A very interesting idea that came to mind is to change the raid of nas. In particular, use external hard drives, usb docking ports, as part of the raid using raid 5, or add an external HD to use as spares in case of failure. I have not done any testing on this, mainly for lack of hd, but if someone had the same idea and my feeling is there let me know something. :-)

Upgrading the kernel (?!?)

Thanks
I thank the members of the forum "General NAS-Central Forums", which with their helpful post allowed the writing of this article and especially to pierce my nas. :-)

Further NAS tweaking
These are 2 more Google Translated posts made by Steppenwolf on his blog.

LaCie 2big Network tweaking: filesystem defragmentation xfs_fsr
Those who have already done the hack will have noticed that the partition containing the user data is formatted with the filesystem xfs. This excellent filesystem has a bad habit, with the use of fragment thus deteriorating its performance.

To see the fragmentation status of your file system:


 * 1) xfs_db -c frag -r /dev/md4

You will see something like this:

actual 3144, ideal 3135, fragmentation factor 0.29%

We need to defragment the nas utility xfs_fsr, which is not installed on the nas. I retrieved the program from the distro package xfsdump compiled for debian lenny armtel therefore compatible with the nas. I removed all files from the package does not strictly necessary, reducing it to 14kb.


 * Download the file xfsdump_2.2.48-1_armel.tar.gz
 * Copy the file in your shared folder on the NAS.


 * 1) cd /home/share/nome_cartella_della_vostra_condivisione
 * 2) tar -xvzf xfsdump_2.2.48-1_armel.tar.gz -C /
 * 3) xfs_fsr -v

You can also go take a coffee, the first execution of the program has committed more than 4 hours to finish. :-P

For those who had not been informed, has recently released a firmware update ver 2.2.6 of nas. If you wonder what happened to versions 2.2.4 and 2.2.5 of 2.2.4 ... well, I can not tell much, but the firmware version 2.2.5 has been a total flop. The installation process, which consisted of two files to upload to the NAS, they planted the loading of the second file.

I tested the hack on this new firmware version in the following ways:


 * nas with firmware 2.2.3 and updated to ver 2.2.6
 * updated to version 2.2.6 and higher

in both cases it was possible to pierce the nas.

LaCie 2big Network: support user-space NFS
I had previously tried to install the nfs support on my old (v1) nas of the LaCie 2big Network, but I gave up for the lack of nfsd kernel module, which allows you to enable NFS server kernelspace.

Recently, after a request for help from a navigator, I tackles the problem by finding a solution: nsf in user space. Ok I also turn up their nases because of the enormity of what I just said .. In fact, there are no major handicap for nfs userspace: the development of the code has been completely abandoned (the latest version is 0.9.22 and dates back to 01/05/2009), but the most serious problem that there is no support for the file locking.

To install support for NFS v3 on nas need unfsd demons and portmap, nfs, the first is that the second is an ONC RPC service, running on a networked machine, which provides other services ONC RPC (Remote Procedure call). (If you're used to program knows what I'm talking about) In short unfs3 the package depends on the package portmap. For all practical purposes means that the installation is required also to have nfs portmap service running. It also means that I have written two scripts for initng to start / stop the daemons properly.

File portmap.i:

daemon portmap { need = bootmisc virtual/net; provide = virtual/portmap; pid_file = /var/run/portmap.pid; forks; env PORTMAP_OPTS=; env_file = /etc/portmap.conf; exec daemon = /sbin/portmap; }
 * 1) NAME: portmap
 * 2) DESCRIPTION: DARPA port to RPC program number mapper
 * 3) WWW:
 * 1) exec daemon = /sbin/portmap -d ${PORTMAP_OPTS};

File unfs3.i:

daemon unfs3 { need = initial virtual/portmap virtual/net; env PID_FILE = /var/run/unfsd.pid; env_file = /etc/unfs3.conf; pid_file = ${PID_FILE}; require_network; forks; exec daemon = /usr/sbin/unfsd -i ${PID_FILE} $DAEMON_OPTS; daemon_stops_badly; }
 * 1) NAME: unfs3
 * 2) DESCRIPTION: starts user-space NFSv3 server.
 * 3)         UNFS3 is a user-space implementation of the NFSv3 server specification.
 * 4)         It provides a daemon for the MOUNT and NFS protocols,
 * 5)         which are used by NFS clients for accessing files on the server.
 * 6)         Unlike nfs-user-server, unfs3 is capable of handling files larger than 2GB,
 * 7)              but there is currently no support for file locking.
 * 8) WWW:

Installing servers nfs3

As a general assumes that:


 * have already made ​​the hack of your nas ( see article ),
 * and above all with it installed ssh tcp-wrappers libraries,
 * you have a root account on your NAS (all documented in the operations mentioned above)
 * and above all, a good command of bash and linux systems.

To install the nfs server, you have to download these two files:


 * portmap_6.0-9_armel.tar.gz (10.6 Kb)
 * unfs3_0.9.21_armel.tar.gz (38.2 Kb)

The packages have been downloaded the distro debian lenny and are compiled for armtel, I deleted the files from both the doc and man pages in order to recover all the space possible. I moved the portmap configuration file in the folder /etc and I renamed portmap.conf. The daemon configuration file has unfsd own (not to be confused with the file /etc/exports) I renamed unfs3.conf and also inserted in the folder /etc. These changes were due since the NAS architecture differs from architecture of an operating system debian. The script to reflect these changes initng so if you changed the files you place to amend the startup scripts of the demons.

Copy the file in your shared folder on the NAS.


 * 1) cd /home/share/nome_cartella_della_vostra_condivisione
 * 2) tar -xvzf portmap_6.0-9_armel.tar.gz -C /
 * 3) tar -xvzf unfs3_0.9.21_armel.tar.gz -C /
 * 4) rm portmap_6.0-9_armel.tar.gz
 * 5) rm unfs3_0.9.21_armel.tar.gz
 * 6) cd /etc/initng/runlevel/
 * 7) echo portmap >> default.runlevel
 * 8) echo unfs3 >> default.runlevel

Now you must configure the file exports that tells the NFS daemon which folders to share in your local network:


 * 1) vi /etc/exports

Remember that the commands for editing a file with the vi editor is the "i" to insert new text, and "ESC" + ": wq" to save and exit, "ESC" + ": q!" to force the output from the file without saving your changes.

The configuration file in question I leave to your own experience, if you are installing NFS on the NAS assumes that you know what you are doing. But please note that this version of NFS (unfs3) does not support NFS v4 NFS v2, it also does not support even a few tags to be configured as sync.

I did not want to implement support for NFS v2 definitely outdated, it assumes that an NFS client, unless otherwise specified, the protocol that should be used to share a folder locally exported from a remote machine, and NFS v3. Finally NFS v2 does not support files larger than 2GB.

Once your exports file you can reboot the machine or if you prefer to manually start the daemons with the command:


 * 1) ngc -u portmap
 * 2) ngc -u unfs3

For more information on ngc, type:


 * 1) ngc -h

And to think that this nas not use it even more ...

Upgrade.

I modified the script again unfs3.i putting the line require_network immediately due to the opening of the demon unfsd by initng (even before the network interface lan was active). The demon unfsd did not publish the socket address of local network preventing access remotely.

Clause require_network imposes initng to wait while the network interface of the LAN is active before starting the server unfsd: problem solved.

Rsync

Startup script for rsync. (The program is already included in nas) File rsyncd.i :

daemon rsyncd { need = bootmisc virtual/net; require_network; env RSYNC_CONFIG_FILE=/etc/rsyncd.conf; env_file = ${RSYNC_CONFIG_FILE}; exec daemon = /usr/bin/rsync --daemon --no-detach --config ${RSYNC_CONFIG_FILE}; daemon_stops_badly; }
 * 1) !/sbin/itype
 * 1) Short-Description: fast remote file copy program daemon
 * 2) Description: rsync is a program that allows files to be copied to and
 * 3) from remote machines in much the same way as rcp.
 * 4) This provides rsyncd daemon functionality.

For more information on rsync to see in the comments of this article.

Reviews

 * 1) http://www.smallnetbuilder.com/content/view/30379/75/

Links

 * 1) http://www.linuxdevices.com/news/NS2898756158.html
 * 2) http://www.steppen-wolf.eu/blog/2009/11/18/lacie-2big-network-hack-telnet-openssh-ntpd-cups-and-more
 * 3) http://www.steppen-wolf.eu/blog/2010/04/14/lacie-2big-network-tweaking-deframmentazione-filesystem-con-xfs_fsr/
 * 4) http://www.steppen-wolf.eu/blog/2010/10/22/lacie-2big-network-supporto-nfs/