mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 10, 2006 18:55:47 GMT 7
Hey guys! I thought it might make life easier for some folks out there, so I've created a N2100 module that enables SSH. You can find it on www.onbeat.dk/N2100Also, since it seems Thecus might change the root password in the upcoming versions of the firmware, I've created another module, which simply resets the password. That might be useful too. (Unless of course Thecus completely changes the way passwords are stored, but that I seem to doubt, since it's done the usual /etc/passwd way) I hope you find it useful! Enjoy, Mikkel
|
|
|
Post by ryebank on Sept 11, 2006 16:35:51 GMT 7
That is really useful - thanks for this. And it does appear that the beat of the next firmware has change the root password so the other module is great too - but really needs a way to set the password to one's own choice (I haven't tried the mod yet so shoot me if it already does) especially if people have their box web facing - could it not be set to load password from a file on the N2100 somewhere?
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 11, 2006 21:03:23 GMT 7
No, the ROOTPSW module simply resets the password to "irresistible". If you afterwards want to change it to something else, simply login with SSH and execute the passwd command. It will then keep this password until changed again (or next firmware upgrade?)...
(I figured, if a user wants SSH, he/she would also know how to change password on a Linux box)
|
|
|
Post by dbridges on Sept 14, 2006 16:35:40 GMT 7
Sorry to do this but i cant get either of these modules to install.
I'm running firmware 2.1.00
Thecus' bit torrent module installs fine.
Any help would be much appreciated.
Thanks.
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 14, 2006 19:17:00 GMT 7
What happens when you try to install? Any error messages?
What kind of raid configuration are you using?
Try to describe as much as you can about you configuration of the N2100, as this probably differs from mine (hence the modules not installing)
Have you previously tried hacking the box in other ways, which could have corrupted the box?
Try to enable SSH by pushing the "reset" button (next to the ethernet RJ45) until it beeps. Then see if you can get a login prompt using SSH.
Anything else you can come to think of that might be useful...?
Cheers, Mikkel
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 14, 2006 19:23:08 GMT 7
Another thing...
Are you sure the modules have not been corrupted during download?
My SSH module has a size of 8386 bytes. If you can do a MD5 checksum, you should come up with 14bb926f16547793c0f2c2b749271e20
Try to rename the module to SSH.tar.gz and see if you can unpack/extract files from it... (taking that you have a tool to handle tar.gz files)
Best, Mikkel
|
|
|
Post by dbridges on Sept 15, 2006 5:46:39 GMT 7
The history of the box is as follows. Upgraded the firmware as soon as i got it only to discover that they'd shipped it with the latest firmware 2.1.00 It's got 2 segate barra. 200GB sata drives in raid 1. Took about 5 hours to initialise (probably because the drives previously contained an nvidia raid 0 stripe) Most things are turned off. (itunes, ftp, upnp) and no public assess to anything. I've only ever accessed it via the web interface. I've never installed the windows client. I was able to open both modules myself so there's no corruption in the download. In the meantime i've got SSH enabled on startup thanks to your instructions here onbeat.dk/N2100/HOWTO-InstallSlimserverOnN2100.htmlThe install process went through the motions (so to speak) but there were no files in /raid/modules. There were no error messages. I did notice that the module was put together a bit different to the bittorrent module that thecus have so if you dont mind i'm going to have a play and see what i can come up with. Looking at both though i've discovered that the module information is stored in a database. Neat. I'm assuming that it's mysql so i'll have a play at that later :-) I didn't go any furthur than that because i was more interested in locking down public access to the gallery. I used the .htaccess / .htpasswd method posted around here somewhere but discovered that the files were being deleted on reboot. I've got some code in /app/cfg/rc which copies the files from my webdisk folders just before apache starts. This has given me the idea of creating a module which executes a specific script located in a specific web disk folder (i'll create a new admin folder). I can load it with whatever i want and have it execute on boot. It then means that i dont always have to keep logging in using SSH and gives me some greater flexability in how it's configured. My primary goal is to replace the initial web interface with my own and i'm hoping eventually to add a small online store module. I'll have a play with the module again tonight after work. thanks. dbridges
|
|
|
Post by dbridges on Sept 15, 2006 20:29:05 GMT 7
I rebuilt your code into a module called MOD-SSH and was able to get it to install except that the first 2 characters were getting chopped of.
I debugged the php which does the install and it is dependant upon the way the tar is created.
See the comparison...
N2100:/raid/David# tar ztf /tmp/module1.tgz ./P2P-BT/ ./P2P-BT/WWW/ ./P2P-BT/WWW/img/ ./P2P-BT/WWW/img/start.png ./P2P-BT/WWW/img/delete.png ./P2P-BT/WWW/img/stop.png ./P2P-BT/WWW/img/BT.png ./P2P-BT/WWW/taskinfo.htm ./P2P-BT/WWW/index.htm ./P2P-BT/WWW/addP2P.htm ./P2P-BT/WWW/delP2P.htm ./P2P-BT/Binary/ ./P2P-BT/Binary/P2P ./P2P-BT/Binary/ctorrent ./P2P-BT/Driver/ ./P2P-BT/Shell/ ./P2P-BT/Shell/uninstall.sh ./P2P-BT/Shell/install.sh ./P2P-BT/Shell/module.rc ./P2P-BT/Shell/enable.sh ./P2P-BT/Thecus ./P2P-BT/System/ ./P2P-BT/System/etc/ ./P2P-BT/System/lib/ ./P2P-BT/System/var/ ./P2P-BT/System/conf/ ./P2P-BT/System/seed/ ./P2P-BT/System/status/ ./P2P-BT/System/include/ ./P2P-BT/Configure/ ./P2P-BT/Configure/install.rdf ./P2P-BT/Configure/httpd.conf ./P2P-BT/Configure/ssl.conf ./P2P-BT/Configure/license.txt N2100:/raid/David# tar ztf /tmp/module.tgz MOD-SSH/ MOD-SSH/Thecus MOD-SSH/Configure/ MOD-SSH/Configure/install.rdf MOD-SSH/Configure/httpd.conf MOD-SSH/Configure/ssl.conf MOD-SSH/Configure/license.txt MOD-SSH/System/ MOD-SSH/System/include/ MOD-SSH/System/status/ MOD-SSH/System/seed/ MOD-SSH/System/conf/ MOD-SSH/System/var/ MOD-SSH/System/lib/ MOD-SSH/System/etc/ MOD-SSH/Shell/ MOD-SSH/Shell/uninstall.sh MOD-SSH/Shell/install.sh MOD-SSH/Shell/module.rc MOD-SSH/Shell/enable.sh MOD-SSH/Driver/ MOD-SSH/Binary/ MOD-SSH/WWW/ MOD-SSH/WWW/index.htm MOD-SSH/WWW/img/ MOD-SSH/WWW/img/start.png MOD-SSH/WWW/img/delete.png MOD-SSH/WWW/img/stop.png MOD-SSH/WWW/img/BT.png N2100:/raid/David# N2100:/raid/David#
|
|
|
Post by dbridges on Sept 15, 2006 20:43:12 GMT 7
LOL ;D The modules are only tar's and my thecus is hard coded to expect tgz's That's what the problem was. When i took a module and renamed it to tar and gzip'd then renamed it back to .mod it loaded fine.
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 17, 2006 14:11:34 GMT 7
Yeah,, I knew about the ./ prefix in the tgz file, I ran into that one as well. About the gzip, I must simply have forgotten to add the z to the tar command. My mistake...
FYI, I've updated the modules on the webpage...
Best, Mikkel
|
|
|
Post by gunny2k6 on Sept 19, 2006 21:18:10 GMT 7
how are you guys making the tar.gzs with ./ prefix whats the command line to ? tar -czf ?
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 20, 2006 3:50:17 GMT 7
Just make sure you are one level above the directory you want to tar and specify the ./
Example:
#cd /tmp #mkdir MOD123 #tar -cvzf MOD123.tar.gz ./MOD123
HTH, Mikkel
|
|
|
Post by ryebank on Sept 22, 2006 21:57:45 GMT 7
Mikkel - I hate to be a pain but I can't get the SSH or ROOTPSW modules to load up properly at all - when I upload the mod file to the Thecus it never gets displayed in the modules list - I have tried loading the BitTorrent and PPPBlog modules from Thecus's site and they load OK and list themselves in the module page - am I missing something? Could it be related to my Thecus IP address being different that default or something. I have redownloaded both from your site (incl. the update to SSH you did). Maybe it is a download problem - what size should the mod files be?
I really appreciate the work you are doing to open up the N2100 - I am a novice on Linux but very experienced in general with networks and things (sadly back to old IBM maniframe days) so I am looking forward to being able to use the N2100 as a learning experience. I wanted to make sure I could change the root pw before installing the new firmware ...
|
|
mshapf
Junior Member
Posts: 74
|
Post by mshapf on Sept 23, 2006 18:42:07 GMT 7
Nope, you're not missing anything and it's not because of a different IP address.
I think that the extension of the file (.mod) confuses the browser/server's MIME settings and corrupts the file. At least I got "different" files using Firefox and wget when downloading. So now I've put the modules inside a tarball and updated the webpage.
Hopefully that helps. Let me know...
Best, Mikkel
|
|
|
Post by ryebank on Sept 26, 2006 1:08:41 GMT 7
Thanks a bundle Mikkel - all working now - mod's from the .gz's where both 9kb but two I had downloaded earlier as .mod's where 40kb for SSH and 30kb for ROOTPSW - not sure if you have fine tuned them but the new ones loaded up a treat and I am a happy bunny!
Now I have almost finished backing up my N2100 so I can trash it with the new firmware to see if I can get the improved speed on RAID rebuild it talks of. I'll let you know how your modules work.
Do you recommend upgrading firmware then SSH'ing in to change the root passord before reboot? And do you know if I need to change the root password back to the "thecus" one before upgrade?
Anyway ... thanks again - great work - and your site is looking better and better too
|
|