[Announce] Jac2a Alternative Firmware for NAS200

Discussion in 'Cisco/Linksys Network Storage Devices' started by jac_goudsmit, Dec 21, 2008.

  1. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    This version is now obsolete.

    Please click here for the latest version


    Announcing Jac2a!

    Regardless of any text in this article or any other posts in this forum (or interpretation thereof), I will not take responsability for anything that happens with your NAS200 or any other hardware as a result of the use (or inability to use) this firmware. By initiating a download of any part of my firmware in any form, you acknowledge that you understand that this firmware was developed for my own use, that any support is based on "best effort" (which may vary depending on how busy I am in real life) and that there is no warranty of any kind, not even the warranty that your NAS200 or any other system on your network will keep working or can be restored to working order. If you disagree with this, or if it's illegal to limit my responsability this way in your area, then you are hereby forbidden to download any of the files that I make available.

    The firmware is redistributed under the GPL License v2. Source code is available for free (gratis) download upon request (just send me a PM).

    I know I said I wasn't going to do this, but I decided that because NASi200 is progressing so slowly, I should spend some time on an update to the Jac0 firmware to add RAID support which is one of the most requested features. Actually I got some updated scripts from Lumpy_Skumbry for RAID support that started all this, so you should really thank him for this update.

    Lumpy_Skumbry kindly permitted me to release his changes as Jac1 which would have been Jac0 plus RAID support. But once Jac1 was almost finished, I realized it wouldn't take much work to port the changes to the R75 firmware and to improve support for updating the Twonky media server.

    So I decided to drop Jac1 and move on to Jac2 based on R75, but it turned out that there was a small bug in one of the boot scripts that prevented systems with two drives in Separate Disk mode from booting.

    The Jac2a firmware for NAS200 has the following features which are further explained below:
    • Telnet server (ported from Jac0)
    • Dropbear (ported from Jac0)
    • Kernel enhancements (ported from Jac0 and Linksys R75)
    • Based on Linksys firmware V3.4 R75, i.e. many bugfixes and full web GUI support for non-journaled (ext2) file system
    • Support for startup scripts in a way that's mostly backwards compatible with Jac0, however RAID configurations are now supported
    • Support for easy installation of updated Twonky media server (all you need to do is unpack it in the right location and reboot)
    • Fixes the bug that prevented Jac2 from booting in Separate Disk mode when 2 disks were present
    • Uses almost 100KB less memory than Jac2, R75, Jac0 and R62

    This makes the Jac0 and Jac2 firmware obsolete, but you can still refer to the Jac0 thread if you want to know what I did to build it. I attempted to make the Jac2a instructions a little more user-friendly than Jac0 although this is still not intended for those who have no Linux knowledge at all.

    Downloading and installing

    You can download the firmware here.

    File size is 8388608 bytes, MD5SUM is 142c21a4d726a932b730086ed52b8d45. If you want a copy of the source code, send me a PM.

    Use the Firmware Update page of the NAS200 web GUI to install it; you can always go back to R62, R75 or Jac0 by downloading and installing them the same way (but remember, once you format your disks in non-journaled mode there's no way back to R62 or Jac0!)

    If you previously installed Jac2 and ran into the bug that prevents it from starting with two disks in Separate Disk mode, simply remove the second hard disk while the unit is off, and start it up with just one disk for the duration of the update. With only one disk, the system will start up correctly and you can download Jac2a through the web interface without loss of data or configuration settings. After installing Jac2a, you can reinstall the second drive (again, while the power is off).

    SECURITY ALERT! After you install Jac2a, the telnet network port is enabled; anyone on your network who knows how to connect via Telnet will have full access to your NAS and your files. Unless you trust all the people who might ever be on your network, you should disable Telnet; see the next section for more information.

    The first time you restart the NAS200 after you first install Jac2a, the NAS200 will take more than 5 minutes before it comes online (unless your NAS200 previously had Jac2 or Jac0 installed on it). This is because Dropbear has to generate encryption keys which takes a while. It stores the keys on the hard disk, so the next time it skips the process and the NAS200 will start normally again.

    If you are interested in additional filesystem modules, you can download them here. File size is 9848123, md5sum is f09e1a8bad8ea61f1cb1e3ed847a7820. Note, these are just the kernel modules for extra filesystems (such as cifs, iso9660 and NFS), you can load them using the insmod command (modprobe is not implemented) but you will probably need more software to actually use these.

    The Telnet daemon is enabled by default, and no password is required to connect through telnet. This backdoor is necessary because you will need to set the root password before you can log in through SSH.
    The Admin password is not the same as the root password, and only Linksys knows the root password that gets set by the original firmware.

    The Telnet daemon uses the /dev/pts/* device nodes to get a terminal. The recommended method to disable Telnet is to log in through an SSH shell and move the /dev/pts directory (e.g. mv /dev/pts /dev/pts_offline). Then all you need to do to re-enable telnet is to re-create (or move back) the device nodes. You won't even have to restart the box to disable or enable Telnet this way. Of course you can also write a custom script to disable telnet automatically, see below for more information about custom scripts.

    A more permanent way to disable Telnet is to create a file no_telnetd in one of the config partitions on your system (e.g. you can enter the command touch /harddisk/volume_1/conf/no_telnetd from a Telnet or SSH prompt). Be careful, if you lose the root password (or you forgot to set it in the first place), you won't be able to log in through SSH to erase the file again; you'll have to use a custom script to do it or you'll have to use the web interface or the reset button to reset the user accounts...

    Dropbear SSH server (and client)
    SSH is a secure protocol that is (relatively) safe to expose to the Internet, unlike Telnet which you should never expose to the Internet. I used Gentoo to build Dropbear 0.49 in "multi" mode (the binary file is a copy of the dropbearmulti file in Jac0). It not only supports incoming SSH connections (on port 22) but it will also let you make outgoing SSH connections once you're logged in to the NAS200.

    Your NAS supports FTP for downloading and uploading files from and to the NAS200 (and an HTML interface for downloading only). However, due to limitations in the FTP protocol and in the implementations of most NAT routers, it is usually impossible or at least very difficult to get an FTP server such as the one on the NAS200 to work behind a NAT router/firewall; see e.g. here for an explanation. Furthermore, all data transfers including user ID and password are unencrypted with FTP and can easily be intercepted.

    Dropbear allows you to use the SCP protocol to securely download and upload files from and to the NAS200 over the Internet through an encrypted connection that uses just one port: port 22, the same as the one used for SSH login. All you have to do is configure your router to forward that port to your NAS200 and use a program such as WinSCP on the client side. In WinSCP (or any other file transfer program that supports SCP) you enter the address of your NAS200 (or if it's behind a NAT router, the Internet address of the router), use root as user ID and your root password (see next section) as password. Make sure you select the SCP protocol; other protocols such as SFTP are not supported.

    As mentioned before, Dropbear will generate the private encryption keys at startup and will store them on the configuration partition of the first hard disk, if they're not already there. This takes a few minutes and slows down the first boot after the install, but it only needs to be done once. It may be necessary to regenerate the keys if you change the host name, but I'm not sure about that.

    Changing the root password
    In order to log in through SSH, you have to know the root password. Unfortunately, the root password that Linksys initialized your NAS with, is unknown to anyone outside Linksys. So, we need to set it in another way. That's why telnet is configured so that it doesn't require a user ID or password. To set a root password, connect via Telnet and enter the passwd command. You may also have to edit the /etc/passwd file using vi to set root's home directory to a valid location.

    You will not be able to log in under any other user ID except root. Not even "ourtelnetrescueuser" (which is one of the users in the /etc/passwd file) will work because the home directory for that user doesn't exist. If you added any other users via the Web GUI, you won't be able to log in as any of them either: the web GUI deliberately puts an illegal shell string "/dev/null0" (for users without admin access) or "/dev/null1" (for users with admin access) in the /etc/passwd file. If you change the shell, the user won't show up in the web GUI anymore. If you want, you can add shell users manually but I never tested this and I doubt that many of you would need it.

    One more thing you should know: In the event that your configuration would ever get reset to the default, the root password will be set to "root" (without the quotes). This happens when you use the configuration reset option from the Firmware Update->Configuration Restore web GUI, when you push and hold the reset button or when the first hard disk goes bad.

    Custom startup scripts
    NOTE: due to a bug, only the early.sh script works at this time. I will fix as soon as possible. Sorry for the inconvenience...
    During startup, the Jac2a firmware will search for any custom startup scripts in the rc.d directory on any of your harddisks. The filenames of the scripts have to match rc.* to be started. If you create a script file, make sure you use an editor that supports Unix style line endings (LF only) and start the scripts with "#!/bin/sh". The firmware will make the files executable (it will change the owner of all files to root and will change the access rights to 777) and will simply try to run all scripts in alphabetical order. Note that the 777 access rights allows anyone to modify the files so you may want to disable access to the "DISK 1" and/or "DISK 2" shares for people you don't trust. Alternatively you can change the locations where scripts are searched; more about this in a minute.

    If something goes wrong with any of your custom scripts, the startup shell will quit with an error message which you can't see unless you have a serial port console. When this happens, your NAS200 won't finish booting so you won't have access to it, not even to correct the problem. That would be bad. So there is a fail safe mechanism: before the Jac2a firmware starts running your startup scripts, it creates a file "failskip" in the rc.d directory, and after it runs your scripts it deletes this file again. If the file is found on the next startup, the firmware will skip all custom scripts under the assumption that something must have gone wrong that prevented the system from finishing the startup procedure. So if something goes wrong during execution of your scripts and the box doesn't come up after a while, simply unplug it, re-plug it and power up again to make it boot without executing your scripts. Note, it may take longer to boot because the file system may need to be checked (power and disk lights blink alternately).

    Besides these scripts that get started after the harddisks are mounted and the network is online, you can also create a script that gets run before the harddisks would normally get mounted. This script is called early.sh and can be stored in the configuration partition of any of your harddisks (this is different from Jac0 where the early.sh was also on the data partition -- this change was necessary to prevent data loss on RAID configurations). There is a fail safe mechanism for the early.sh script too; in that case the fail safe file is called earlyfail and is stored on the same partition as your early.sh. Because early.sh is on a configuration partition, you will have to copy or move it there by using shell commands via Telnet, SSH or the serial port. Make sure you know what you're doing! Normally you should not need early.sh.

    By default, all harddisks are searched for script directories (rc.d), but you can override this by editing the file scriptdirs.txt on the first configuration partition that can be found. If the Jac2a firmware can't find any file /harddisk/volume_*/conf/scriptdirs.txt file, it will create one and will fill it with the list of all directories "/harddisk/volume_*/data/rc.d" including the ones that aren't normally in use on your system. You can edit the scriptdirs.txt file to limit, expand or completely change the locations where scripts are searched. You can even make it empty to completely disable custom scripts. If you delete the scriptdirs.txt file, a new one will get generated on the next startup.

    The default of searching all harddisks means that, theoretically, startup scripts and updated Twonky servers can also be stored on USB devices that are plugged in at boot time (I didn't test this). If you don't want this, you may want to remove the /harddisk/volume_5/data and /harddisk/volume_6/data lines from the scriptdirs.txt file using vi.

    Installing an updated Twonky Media Server
    The Twonky Media Server in the standard Linksys firmware is not the latest version and is known to have problems e.g. with the XBox and PS/3. The Jac2a firmware allows you to download an updated server from the Twonky website and run it with the INI file that gets generated by the Linksys web GUI, or with your own INI file if it suits you.

    NOTE: any Twonky servers that you download from the TwonkyVision/PacketVideo website are covered by the license that is published on that website, not by the license that covers the Twonky that is included in the firmware. You are responsible for meeting the license requirements, which means that after 30 days you should pay TwonkyVision for a license, even though technically you already have one. As far as I know, the built-in Twonky is a special embedded-platform version that was built to run without license key so there is no license key in the on-board INI file or elsewhere and any updated Twonky servers that you download from the Internet won't find a legal license key unless you buy one.

    You can download the latest TwonkyVision server from this location. You will want the X86 Linux version for manual installation.

    The Jac2a firmware will search for the first file that matches /harddisk/volume_*/data/rc.d/twonky*/twonkymediaserver[FONT] as seen from a Telnet or SSH session, or DISK ?/rc.d/twonky*/twonkymediaserver as seen from a Samba or FTP session (by default -- any changes to the scriptdirs.txt file will also have an effect on the search for a Twonky update). This means you should create an rc.d directory in the root of your first hard disk, then create a subdirectory from there called anything that starts with "twonky" (e.g. "twonky449"), and unpack all files in the ZIP there. Make sure you retain the directory structure of the files in the zip file. This has been tested with Twonky 4.4.9 which is the latest version at the time of this writing.

    You can then use the Linksys web GUI to configure and control the Twonky server; the media server gets started when you enable it and click "Save". You will have to either modify the access rights via a shell, or reboot the NAS200 before you start the updated Twonky for the first time, otherwise the script won't find an executable and the built-in Twonky will get used instead of the one you installed. You can use "ps ax" in a shell to verify that twonkymediaserver is started from your directory, instead of /etc.

    By default, the web interface to the Twonky server on port 9000 is disabled. If you want to enable it, simply create a subdirectory and move all files from the zip file there, then create a script named twonkymediaserver that adds any required parameters. Note, because the killall command is used to stop the Twonky server, you have to move it without renaming it, and because the Twonky server expects all files to be in the directory from where it starts, you have to move all files. Use a Unix-compatible editor such as Notepad++ to create the script. Example:
    # Save this file as e.g. "\\NAS200\DISK 1\rc.d\twonky\twonkymediaserver"
    # after moving all files from the twonky zip file to a new subdirectoy "actual".
    # Make sure you use a Unix compatible editor such as Notepad++ to save
    # linefeed-only line endings.
    $(dirname "$0")/actual/twonkymediaserver $* -enableweb 2
    You can use the same method to override anything else that's in the INI file in /etc (which gets generated by the Linksys software every time it starts the Twonky server); you can even use the script to tell the server to use a different INI file from the one that gets passed to it by the Jac2a script.

    The TwonkyMedia server reduces the speed of the NAS200 significantly especially while it's scanning folders. You will be happy to know that Jac2a frees up about 100KB of memory compared to earlier releases, by symlinking instead of copying many files in the /etc directory.

    Known issues and missing features
    Regrettably, there still is no Torrent client, no NFS or RSync and no other features. I decided to go for a minimalist approach to keep changes to a minimum so that I could release this quickly and get back to the NASi200 project. Hopefully I will get some time during the Christmas vacation to work on that.

    The NAS200 doesn't power off anymore when it gets shut down (either from the web interface or by pushing the power button). In R62 and Jac0 this worked fine, so some bug must have crept in since then. For now, you'll just have to unplug the box after the system halts (you can tell that the unit is ready for power down when the power LED stops blinking).

    I use WinSCP to upload and download files to and from the NAS200 via a secure connection. There are two problems with this: first of all, you will get a warning when it tries to get a list of groups; this is not supported on the NAS200. To eliminate the warning, enable Advanced Options, then select the Environment->SCP/Shell option and disable "lookup user groups".

    Secondly, when you navigate to a directory with large files with WinSCP, it will get confused because when the Busybox shell shows a directory listing on a hard disk that has one or more large files, it doesn't separate the group name from the file size (e.g. it shows "everyone12345678901") and WinSCP gets confused about that. You can work around this by using the vi editor on the NAS200 to edit the /etc/group file: simply rename the "everyone" group (501) to e.g. "all". I did this myself and encountered no problems.

    Although the Jac2a firmware may still not be what some people desire from a device such as the NAS200, it should be a great improvement for all users. The NASi200 project will eventually fill the gaps but that may take a while.

    Thanks again to Lumpy_Skumbry for your scripts and suggestions, and thanks again to everyone who contributed to the Jac0 firmware! And of course thanks to those who encountered the bug in Jac2 and were patient for this fix.

  2. fubarbloke

    fubarbloke Addicted to LI Member

    Sweet as

    Thank you Jac! It's perfect.

    From Jac2 with a default config and an empty drive bay 2, I flashed Jac2a and restarted fine. Powered down, added drive 2 to bay 2, powered up and all's well. Restored my old config file; passwords, users and permissions were all back. ssh, telnet, samba, ftp and http all work.

    Good on ya, mate. A wonderful Christmas present -- thanks again. :clap:
  3. leptogenesis

    leptogenesis Addicted to LI Member

    thanks for the great job jac!

    it is working perfectly.
  4. ruif13

    ruif13 LI Guru Member

    Hi great job jac! ;)

    the boot is more faster ,) now

    anyone have the step by step of installation twonky?

    because my don't work :(


  5. ruif13

    ruif13 LI Guru Member


    Something wrong in add Map Network drive and in explore nas200 files in windows file explorer.


    You might not have permissions to use this network resource.
    Contact the administrator of this server to find out if you have access permissions.
    The server service is not started.

  6. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    What are you trying to do? What are you trying to connect to? Did you make sure you set up an account on the NAS200 that has access to the share that you're trying to map? Do you have a firewall installed on Windows? Is it set up correctly i.e. does it regard your local network as safe?

    The easiest way to prevent problems like this is to set up an account on the NAS200 that has the same name as the one you use to log in to your Windows, and (preferably) the same password. When you try to connect to a file server such as the NAS200, Windows will first try to use the credentials with which you're logged in to Windows.

  7. ruif13

    ruif13 LI Guru Member

    Hi Jac, before all i only try to report all the things i see that is not normal in use. and not to say bad things of your good work.
    my older firmware is the R75 of linksys, i've used your first version but ... that version have some problems in boot and others.. and i upgrade to the R75 of linksys.

    Now I have installed your new version and the configs are the same of the older versions,
    i've the same users, the same share, 2 harddisk and share for guest.
    All is the same and works until now.

    Don't work the browse network from all my windows and linux machines.
    The nas200 appears on network but i can't browse

    In the other versions, when i browse the network and see the NAS200 in network i click on the icon and appears a window to put the user and password and i can see the all dirs and files and browse.

    at moment i can't do that.

    Can you help?
    Thanks for your good work
  8. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    In a command prompt window, enter net use. If you see any entries that end in "IPC$", remove them with net use /d \\address\ipc$ and try again.

    If you're still unsuccessful, try mounting a share from the command prompt as follows: net use x: "\\address\disk 1" * /user:admin /persistent:yes

    Also, whenever you browse to the NAS200, don't try to go straight to e.g. "\\address\DISK 1" but browse to "\\address" first (answer the user ID and password prompt), and then browse to the share (e.g. DISK 1).

    Hope this helps.

  9. Johannes Grimmerink

    Johannes Grimmerink Addicted to LI Member

    I installed Jac2a (with a RAID 1 configuration), and it works perfectly.
    Nice work, Jac!
  10. fengerzh

    fengerzh Guest

    Hi, Jac, you never know how wide spread is your users. This is greeting from Beijing, China. I just installed your jac2a firmware and it works perfect! Thanks and I am eager for your iNAS200 project to get either Torrent or EMule to work, anything P2P is ok. Merry Christmas to you!
  11. bartvds

    bartvds Guest

    Hi Jac,

    First of all thanx for the good work!!

    Somehow I ran into a problem after installing the jac2a firmware.
    I can not login to the WebGUI Administration part anymore.

    If I login as admin with my admin-password I get an error : "Incorrect user name or password."

    If I login in the "My files" part of the WebGUI using the same user name and password it works fine.

    Changing the password in the "My Files/Personal Info" section also doesn't solve the problem. Still "Incorrent user name or password" in the administration section, while the my Files section accepts the new password.

    Also the default admin / admin username / password does not work.

    Any idea what goes wrong here ?

  12. oferta.cerere

    oferta.cerere Addicted to LI Member

    Thx jac for the firmware.

    i think that slow transfer isn't resolved with this firmware.

    transfer with winscp is too slow than smb or ftp.
  13. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Sorry, no I don't.

    Other people have been reporting trouble logging in to the NAS200 on the standard firmware too. I haven't been following those discussions because I don't have the problem but because you say that the other login works fine, I would suspect that it's a problem with your browser. Try clearing your browser history or switch to a different browser (Internet Explorer vs. Firefox).

    If that doesn't help, you can try pushing and holding the reset button on the back side of the unit until it beeps, this should reset the admin password to "admin". I'm not sure but you may also have to re-create all other accounts after this.

    Hope this helps...

  14. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    The slow transfer rates can't be solved by software; the hardware simply doesn't allow moving more data than about 6MB/sec at a time. SCP slows it down even further (to about 300KB/sec) because the CPU is needed to encrypt the data.

    The good news is that it's a cheap device, it doesn't use a lot of electricity and it's very hackable.

  15. fiatguy85

    fiatguy85 Guest

    Thanks again, Jac! I was away for the holidays, but 2a fixed the problems from before. Great work!
  16. Vlad

    Vlad Addicted to LI Member

    Thanx for the firmware Jac. It works fine and I am playing with it now.
    That way the device can be much more useful.

    The only issue that I had was that after reboot the root password that I’ve set was lost and the telnet enabled again.
    I am not keeping the NAS on all the time because it is little bit noisy so I am not sure is reconfiguring root access every time is a good solution.
    Thanx one more time!
  17. houlie

    houlie Addicted to LI Member

    ssh connection problem with jac2a


    I installed the jac2a soft. I can get a response from the linksys nas200 to ssh but it does not accept my password. What can I do?


  18. Andrej_b_c_d

    Andrej_b_c_d Guest

    torrent handling?

    Hi all!
    First of all sorry for my bad English, I've learned it myself... :)
    I've read the description of Jac2a firmware, but I did not find anything about handling torrent. Is there any way to install on nas200 a torrent client to up/download torrent without pc? Sorry if my question is crazy, but I'm newbie.
    It would be great if somebody can help me to reduce my electricity bill.
    please send me a private message!

    THX in advance!
  19. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Change the root password from a telnet session, then reconnect with SSH.

    You can't log in as anything else than root; all other users have invalid shells and/or invalid home directories in /etc/passwd.

  20. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    There is no Torrent support for the NAS200 in any firmware at this time. I'm personally not very interested in Torrent but it gets requested very often so rest assured that it will be one of the first features that will be added to NASi200.

  21. toneyanwari

    toneyanwari Guest

    Flashing with Jac2a

    I have upgrade my NAS200 from linksys original to Jac2a version.
    Then, I restart that NAS and do restore to default. But the new features of Jac2a do not come. All are same as I am using the original firmware. I am so confirmed about this as the status also say the firmware use is V34R75.
    Could somebody please help me on how to install the Jac2a correctly ?
    Many thanks in advance.
  22. oferta.cerere

    oferta.cerere Addicted to LI Member

    Try a telnet session to nas ip. if you see the this message it's mean you have installed right Jac2a correctly:

    "BusyBox v1.00-rc2 (2008.12.20-20:12+0000) Built-in shell (ash)
    Enter 'help' for a list of built-in commands."
  23. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    The Web GUI on Jac2a is unchanged from the Linksys software, and the version on the status page will not tell you whether you have Jac2a or Linksys installed; I don't know where the web server gets this information so I'm unable to change it.

    If you can connect via Telnet, you have Jac2a installed. If not, you're still running Linksys.

  24. houlie

    houlie Addicted to LI Member

    I do not see any root user (only admin). When I try to create it it says there is already one. Is there a password by default for root user?


  25. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Root is one of the user ID's that doesn't show up in the web interface. It's only used for connecting to the unit via command line interface e.g. telnet or SSH. Root has all access to all areas of the system (not just the hard disks) so it has the potential of causing damage, that's why the web GUI doesn't give you access to the root account.

    The root user always exists on any Linux system (if not, it won't work properly), that's why you can't create it. Linksys gives it a password too and I don't know that password. So after you install Jac2a you can't connect through SSH because you won't know the password. However if you connect via Telnet, you won't be asked for the password and you can use the "passwd" command to change it to something else without knowing what the old password was.

    If you are planning to use the command line interface, you should probably already know all this; if you're not planning on using the command line interface, I'm not sure if Jac2a is going to be useful to you because all features in Jac2a require at least some knowledge about the Linux command line interface...

  26. houlie

    houlie Addicted to LI Member


    Well I do not use it on linux but osx 10.5. So I am not sure about the root user. Anyway, I use ssh on a daily basis. But anyway, your comments on it might useful for others.

    I plan to use this nas200 overseas to backup multiple machine so I cannot use telnet

    I tried to change the password after connecting using telnet but the password was not accepted via SSH....Any ideas?

  27. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    At the risk of asking a stupid question, did you start ssh with "ssh root@aaa.bbb.ccc.ddd"? or just "ssh aaa.bbb.ccc.ddd"? In the latter case, it will probably try to log in under the same ID as what you're logged in to on your Mac.

    Sorry I'm not familiar with OS/X...

  28. houlie

    houlie Addicted to LI Member

    This is a good question.

    I believe I tried root@aaa.bbb.ccc.ddd

    Anyway, I have created a user account already exsiting on my Mac.

    Thanks for your help,

  29. nick_1964

    nick_1964 Addicted to LI Member

    Hi, I am Nick from the Netherlands and never used unix before.
    I upgraded my Nas and want to change to
    Ik know how to copy the password file.
    Even find a way to edit it.
    The hardest part: "Use vi to edit /etc/passwd to change the login directory from "/root" to e.g "/" ......
    But the first line look like:
    Can someone give me an example how that line must look like ?
    Ok found out is must be root:decimal number :0:0:/root:/:/bin/sh
    Works now :) does the editor in winscp the same job as VI ?
  30. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Hi I'm Jac and I imitate Donald Duck :wink: (sorry, Dutch insider joke for those who grew up in the 80s)

    Sorry, I could have made that clearer. The line should read something like:
    root:<encrypted password>:0:0:Willie Wortel:/:/bin/sh
    I didn't think of that, but yes it should work fine. It doesn't have a setting to change line endings between Unix and DOS/Windows but I believe WinSCP takes care of that by downloading and uploading the file in text mode.

  31. nick_1964

    nick_1964 Addicted to LI Member

    Hi I'm Jac and I imitate Donald Duck (sorry, Dutch insider joke for those who grew up in the 80s)

    Good one... while I was reading it, I was thinking the same actually ;)

    Thanks for all your work, Willie Wortel...

    Hope a webserver will be added soon ( or is this already possible ? )
    (And a downloadable faster CPU :thumbup: )
  32. rjfan91

    rjfan91 Guest

    Any update to this? I'm having the same issue.

    Also dealing with the system booting up the old twonky software instead of the new. However, I think this is more related to not knowing where to put the files.
  33. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    I'm looking into implementing better and easier ways to enable/disable Telnet and updating Twonky. Also, I found out why it doesn't turn its power off. I'm not ready to release another version just yet, but I expect to do that Real Soon Now (tm).

  34. adama

    adama Addicted to LI Member

    Thank you Jac for this excellent firmware! I'm looking forward to the NASi200 as well.

    Vlad, rjfan91, the solution can be found in the jac0 instructions, you need to copy /etc/passwd to /harddisk/volume_1/conf/passwd after modifying that file (or using the passwd command). Not sure why that part was left off this thread. If you are still having trouble, check the jac0 thread, it has some other bits of information that were left out of this one. Best of luck,

  35. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Thanks for the kudos!

    /etc/passwd is a symbolic link to the actual file which is stored on the configuration partition (not sure if this was the case in the old software too). I don't know why a change to /etc/passwd wouldn't end up on the hard disk immediately; I can only speculate. Maybe the system didn't sync before shutdown, maybe the software overwrote the file after you saved it, maybe it was a PEBKAC.

  36. adama

    adama Addicted to LI Member

    Hmmm, I thought that's how I had got it working, I had the problem at first as well (root password wouldn't stick)... :confused:

    I have a couple of other questions as well.

    1. can I configure dropbear sshd to listen on a different port? I can't find any proper config files, only the line in /etc/inetd.conf, and I don't see where it's written from.

    2. I was trying to install rsyncd as per a thread on here somewhere and it is trying to use /harddisk/volume_1/data/rc.d/rc.rsyncd to add a line to the inetd.conf file. Unfortunately the rc.d files are not run by this firmware, only the early.sh ...how would I go about adding the line using the early.sh file? If I understand correctly, the file won't exist at that point?

    Thanks again,
  37. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    You may be right... sorry, I haven't needed to change the root password for a long time, I will look into it when I get home.

    Dropbear gets started from /etc/rc.d/rc.dropbear. The /etc/rc.d directory is a symlink to /etc.links/rc.d. Probably the easiest way to change it is to delete the symlink and copy the files, then edit the file using sed; something like:

    # save this as /harddisk/volume_1/conf/early.sh
    rm /etc/rc.d && cp -a /etc.links/rc.d /etc && sed -i -e 's/22/1234/g' /etc/rc.dropbear
    I'm not sure if I didn't make any typos or overlooked something and I have no way to test at this time, so it may not work as shown, but it should help.

    The rc.d scripts are currently broken and I'm still trying to figure out why. It appears that
    SCRIPTDIRS="$(cat /harddisk/volume_1/conf/scriptdirs.txt)"
    works fine from the command line but not from a script...

    Instead of writing the commands into a script stored in /harddisk/volume_1/rc.d, you could copy the scripts during early.sh (as shown above) and then add the command to the start of rc.inetd or something.

  38. adama

    adama Addicted to LI Member

    Well I got rsyncd working! I did this (after following the instructions on the rsync thread):
    cd /harddisk/volume_1
    cat data/rc.d/* >> conf/early.sh
    rebooted and it came up with the service running. Now my daily backup cronjob appears to be working (I had to add a "adama-backup" section to /harddisk/volume_1/conf/rsyncd.conf, and "mercury" is just the hostname of my laptop being backed up):
    echo >> $log
    date >> $log
    rsync -axvb --stats --backup-dir=/`date -dyesterday +%Y-%m-%d` /home/adama adama-backup@nas::adama-backup/mercury >> $log 2>&1
    echo done! >> $log
    echo >> $log
    :thumbup: Much sweetness :biggrin:

    I will let you know how my attempt at using port 222 for sshd turns out.

    P.S. The adama-backup user was created as follows:
    1. in the web gui, create the user adama
    2. edit /etc/passwd to add a new "co-user" like so:
    3. set up ssh auto-login with keys, consult google to learn how; the permissions on the files need to be:
    $ ls -la ~adama-backup/.ssh
    drwx------    2 adama    adama          28 Jan 26 00:02 .
    drwxr-x---    4 adama    adama          84 Jan 27 20:40 ..
    -rw-------    1 adama    adama         604 Jan 24 13:34 authorized_keys
    Now I can access the files backed up with rsync, through the web gui as adama.

    :hearts:Jac2a:hearts: :biggrin:
  39. adama

    adama Addicted to LI Member

    I haven't had a chance yet to fiddle with the dropbear configuration - my initial rsync is still running! It's been about 36 hours - I think it should finish soon, my home partition is about 75GB. Then I will run it again test the --backup-dir part of the command. I'm not sure if that part's written correctly right now.
  40. adama

    adama Addicted to LI Member

    I've fixed my rsync command above, it's been running great daily for several days. I'll upgrade to Jac2b before trying to configure sshd. Thanks again, -Adam
  41. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice