1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NAS200 altering config.bin

Discussion in 'Cisco/Linksys Network Storage Devices' started by Onyssius, Feb 12, 2008.

  1. Onyssius

    Onyssius LI Guru Member

    I've renamed config.bin to config.tar.gz and alterred samba configuration files. After packing again to tar.gz and changing name NAS200 gives me error: bad file name or format. Are there any other conditions for packing? The same error was at last official firmware and V3.4R71. I'm using WINXP. I hope that anyone can give me a piece of advice :)
     
  2. Toxic

    Toxic Administrator Staff Member

    you'll probably find that name is needed for the device to work correctly since the firmware will use it for reference. can you not logon to the device and change its name, then save the config?
     
  3. mstombs

    mstombs Network Guru Member

    There may be a problem doing such a task on WinXP, which doesn't understand the difference between upper and lower case in filenames, wrong default line endings and different properties.
     
  4. Toxic

    Toxic Administrator Staff Member

    try using notepad++ to edit it.
     
  5. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Config.bin can indeed be decoded with a suitable program (WinRAR comes to mind) but unfortunately it's not just a tar.gz file: The NAS200 appends some extra bytes to the file that look like a 16 digit hex checksum in ASCII format. I don't know and I don't care much about reverse-engineering it -- with my telnetd-enabled firmware I can already hack the configuration files as much as I want.

    This is what happens when you click the Backup Config button:
    1. It copies all the files that go into the config.bin file to a directory /harddisk/volume_1/conf/config (i.e. on the configuration partition of the first harddisk)
    2. It creates the config.bin file as /harddisk/volume_1/conf/config.bin by using tar cz
    3. It adds the checksum bytes to the file
    4. It lets you download the file.

    The list of files that get stored in the config.bin file is apparently fixed and there are no wildcards: I made my dropbear generate DSS and RSA key files in the config partition of harddisk 1 and it didn't put those files in the config.bin.

    I also already know that the /etc/passwd file is backed up in /harddisk/volume_1/conf and restored from that location on startup. I needed to edit this file to make dropbear work (more info later).

    Just now, I did a little experiment: I edited /etc/CGI_ds.conf and then generated a backup through the web interface and guess what: the config.bin that I downloaded, contains the modified CGI_ds.conf. That's nice because CGI_ds.conf is restored from the flash (/dev/mtd2 to be exact) and I haven't found a way to modify it there... Now I know I can edit it in /etc, make a backup and then restore it: the Restore Config button writes the CGI_ds.conf file back to flash.

    Hope this helps...

    ===Jac
     
  6. Onyssius

    Onyssius LI Guru Member

    Thank you, Jac. Then the only way is to upload modified firmware. At least now I know where to go :)
     
  7. nasuser

    nasuser Addicted to LI Member

    NAS200 speed

    Has anyone addressed the speed issue on the 200? The NSLU2 was an easy mod to make it usable.
     
  8. Gerco Dries

    Gerco Dries Reformed Router Member

    I looked in to this today and it's in fact the file's md5sum in ascii format attached to the end, without a trailing newline character. I would provide the commands, but they should be left as en exercise for the reader. Anyone who cannot perform this without extra instructions should not be modifying config.bin anyway.
     

Share This Page