Mod with SSH, Telnet, FTP and Optware (2008-04-24)

MSS II General talk

Mod with SSH, Telnet, FTP and Optware (2008-04-24)

Postby flox » 15 Apr 2008 15:58

I've packaged a new firmware merging existing contributions.
It works on my MSSII 320. It should work on your box too, but use at your own risk

Here is an extract of the README file:
Code: Select all
INSTALL
-------
1) unpack the zip file
2) install the bin file through the MSSII web interface
3) login via SSH (Putty, ...)
    User: root
    Password: root
4) change the root password permanently
  # rootpasswd

NOTES
-----
* The LED color is solid amber at boot up, when custom steps are performed
* The LED turns solid green when the boot process is over
* SSH is enabled by default
* Telnet server is disabled by default (security precaution)
* FTP server is disabled by default:
    - edit /etc/bftpd.conf and /etc/ftpdusers before
      (see: http://bftpd.sf.net/doc/en/bftpd-tutorial.html)
* Through the web administration:
    - go to "Advanced Settings" / "Advanced Configuration"
* Bootstrap Optware (if you need more programs):
  # sudo /usr/local/bin/bootstrap.xsh
  (without 'sudo' a segmentation fault occurs with Dropbear SSH)
  (alternative: connect through Telnet for bootstrap)
* Two file managers are provided:
    - WebAdmin is a simple Web-based file manager
        (translated in 11 languages)
    - phpFileManager uses frames and shows extra features.
        (translated in English, Portuguese and Italian)
* If you want to use special chars for your passwords (experimental):
  # setvar validate_password_chars 0

(...)
CREDITS
-------
Based on Maxtor firmware 3.1.28
With contributions from:
  hd, stuart_f, ingo, chrisaix, xarks, shonk, flox, johjoh2k.


Image

There's a new mod with 3.4.90 firmware.
See there: viewtopic.php?f=10&t=1026#p4842

Download the latest version based on stable Maxtor 3.1.28 firmware:
http://www.shonk.org/MSSII/coyote-3.1.2 ... -04-24.zip -- shonk
http://www.gianni.biz/download/MSSII/co ... -04-24.zip -- johjoh2k
http://xic.free.fr/z/coyote-3.1.28-ssh_ ... -04-24.zip -- flox

BUG
* language configuration is not saved for the phpFileManager. Here is the fix:
Code: Select all
chmod 0666 /usr/htdocs.en/extra/filemanager.php


UPGRADE (to preserve your configuration)
1) backup your data: only /share and /etc/mxoconfig are preserved
(/opt is preserved because it is a mount point of /share/.optware)
2) write down your Services autostart configuration
3) unpack the zip file and install the bin file through the web interface
(your root password is preserved, the admin password is cleared)
4) restore your Services configuration manually through the web interface
5) perform additional steps to restore your Optware install:
(only if a non-empty folder /share/.optware exists)
Code: Select all
  # mv /share/.optware /share/.prev-optware
  # sudo /usr/local/bin/bootstrap.xsh
  # exit
  # umount /opt
  # rm -Rf /share/.optware
  # mv /share/.prev-optware /share/.optware
  # mount -o bind /share/.optware /opt
  # ipkg update && ipkg upgrade && ipkg list_installed


VARIANTS
* Variant with transmission client: thanks to m.tom59 for the corrections
http://xic.free.fr/z/coyote-3.1.28-ssh_ ... -05-11.zip -- flox
http://rapidshare.com/files/114220931/c ... 1.bin.html (bin only) -- m.tom59
It is a merge of transmission files with the above "ssh_telnet" firmware.
It requires additional configuration steps. See the included README_torrentcli.txt file for instructions.
For support on transmission, please go to the thread about transmission mod: viewtopic.php?f=10&t=849#p4022
Previous release (04-24) is missing the "/bin/nohup" file (nohup.tar.gz is attached below)
http://www.shonk.org/MSSII/coyote-3.1.2 ... -04-24.zip -- shonk
http://www.gianni.biz/download/MSSII/co ... -04-24.zip -- johjoh2k
http://xic.free.fr/z/coyote-3.1.28-ssh_ ... -04-24.zip -- flox

Note: you can install manually the "torrentcli" files on any ssh_telnet fw:
http://xic.free.fr/z/files-torrentcli.tar.gz (includes nohup, httpd.conf and other libevent/sqlite3/transmission files)

* Minimal patched firmware with Busybox Telnet:
http://xic.free.fr/z/coyote-3.1.28-teln ... -04-27.zip
http://www.gianni.biz/download/MSSII/co ... -04-27.zip -- johjoh2k
This firmware is intended for developers that only need Telnet access to the box.
No binary is added to the original firmware, except /bin/wget.
No SSH, no FTP, no web file manager, no services configuration page.
There's no Optware script included, but you can download and install Optware bootstrap.
See the included README file for details.

* Idea of variant with YUM updater: viewtopic.php?f=10&t=1016#p4780 -- johjoh2k
Not released --> need contributor(s)

--
Attachments
nohup.tar.gz
(26 KiB) Downloaded 908 times
Last edited by flox on 14 May 2008 00:52, edited 16 times in total.
flox
Senior Member
 
Posts: 79
Joined: 19 Feb 2008 16:30
Location: France

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby roxx » 16 Apr 2008 02:39

This looks awesome compilation of all the bits and pieces....let me be the one to thank you for all your efforts. Going to try it out. :D
roxx
Junior Member
 
Posts: 7
Joined: 25 Jul 2007 00:08

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby johjoh2k » 17 Apr 2008 04:11

You are simply the best!
johjoh2k
Junior Member
 
Posts: 9
Joined: 10 Apr 2008 03:21

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby Shonk » 17 Apr 2008 17:09

Uploading a mirror for you now

http://www.shonk.org/MSSII/coyote-3.1.28-ssh_telnet_2008-04-15.zip


Just installed it

very clean i like

Edit

Just noticed syncawayd is missing in services
Just checked invoke and its just missing in SVC LIST
SVC_LIST='dropbear utelnetd mDNSResponder syncawayd crond cupsd ntpd httpd nmbd smbd'


mss-info path problems
/usr/local/bin/mss-info: 13: mxoparam: not found
/usr/local/bin/mss-info: 13: smartctl: not found
/usr/local/bin/mss-info: 13: smartctl: not found


/usr/sbin/mxoparam -a|grep 'Serial\|Wait\|Version'
echo
/usr/sbin/smartctl -a /dev/sda|grep 'Model\|Serial\|Firmware'
/usr/sbin/smartctl -a /dev/sda|grep Temp|tr -s ' '|cut -d' ' -f2,10

fixes it


great release
Shonk
Member
 
Posts: 58
Joined: 13 Feb 2008 17:26

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby flox » 17 Apr 2008 19:36

Shonk wrote:Uploading a mirror for you now ... Just installed it ... very clean i like


Thank you :)

Shonk wrote:Just noticed syncawayd is missing in services
Just checked invoke and its just missing in SVC LIST
SVC_LIST='dropbear utelnetd mDNSResponder syncawayd crond cupsd ntpd httpd nmbd smbd'


For the syncawayd, I disabled it just before to release, because I am not 100% sure what it does.
You found the way to enable the setting. 8)
Are you sure it is related with shared folders backup ?
Maybe I will allow the setting for future version.

Shonk wrote:mss-info path problems
/usr/local/bin/mss-info: 13: mxoparam: not found
/usr/local/bin/mss-info: 13: smartctl: not found
/usr/local/bin/mss-info: 13: smartctl: not found


I think this bug only occurs when you use Telnet without login. (the PATH does not include '/usr/sbin' in this case)
Both SSH and "Telnet with login" should read file "/etc/profile" and setup "PATH" variable correctly.
However, I will use full path in mss-info for the future release.

I appreciate the feedback.

--
Florent
flox
Senior Member
 
Posts: 79
Joined: 19 Feb 2008 16:30
Location: France

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby Shonk » 17 Apr 2008 19:45

Just tested cant find the path in ssh


syncawayd is an educated guess
Shonk
Member
 
Posts: 58
Joined: 13 Feb 2008 17:26

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby flox » 17 Apr 2008 22:43

Shonk wrote:Just tested cant find the path in ssh


Very strange...

I've tested again, and I don't have any problem.
What is the output of following commands on your box ?

Code: Select all
 $ set
 $ alias
 $ ls -a ~|grep '^\.'
 $ wc /etc/profile
 $ ps|grep "$PPID\|$$"


Here is the output I got on my box:
Code: Select all
 $ set
HOME='/root'
IFS='
'
LOGNAME='root'
OPTIND='1'
PATH='/opt/sbin:/opt/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PPID='694'
PS1='\[\e[32;1m\]\h:\w \$ \[\e[0m\]'
PS2='> '
PS4='+ '
PWD='/root'
SHELL='/bin/sh'
TERM='xterm'
USER='root'
 $ alias
reboot='mxoparam -c 0;mxotoolbox -f'
halt='mxoparam -c 1;mxotoolbox -f'
 $ ls -a ~|grep '^\.'
.
..
 $ wc /etc/profile
     11      28     281 /etc/profile
 $ ps|grep "$PPID\|$$"
   694 root       1212 S   /sbin/dropbear
   695 root        936 S   -sh
  1562 root        496 S   grep 694\|695


--
Florent
flox
Senior Member
 
Posts: 79
Joined: 19 Feb 2008 16:30
Location: France

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby Shonk » 17 Apr 2008 23:11

Nas2:~ # set
HOME='/root'
IFS='
'
LOGNAME='root'
OPTIND='1'
PATH='/opt/sbin:/opt/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PPID='4218'
PS1='\[\e[32;1m\]\h:\w \$ \[\e[0m\]'
PS2='> '
PS4='+ '
PWD='/root'
SHELL='/bin/sh'
TERM='xterm'
USER='root'
_='/etc/profile'
Nas2:~ # alias
reboot='mxoparam -c 0;mxotoolbox -f'
halt='mxoparam -c 1;mxotoolbox -f'
Nas2:~ # ls -a ~|grep '^\.'
.
..
Nas2:~ # wc /etc/profile
11 28 281 /etc/profile
Nas2:~ # ps|grep "$PPID\|$$"
4218 root 972 S /sbin/dropbear
4225 root 736 S -sh
4268 root 496 S grep 4218\|4225
Shonk
Member
 
Posts: 58
Joined: 13 Feb 2008 17:26

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby flox » 17 Apr 2008 23:27

Ok, I have it....

I have same error as you. I need to change my glasses.

What is missing is 'export PATH' in /etc/profile

Code: Select all
 $ cat /etc/profile
# Environment
export PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH=/opt/sbin:/opt/bin:$PATH
PS1="\[\e[32;1m\]\h:\w \\$ \[\e[0m\]"

# Aliases
...


I will fix in next release.

--
Florent
flox
Senior Member
 
Posts: 79
Joined: 19 Feb 2008 16:30
Location: France

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby Shonk » 17 Apr 2008 23:56

:lol:
Shonk
Member
 
Posts: 58
Joined: 13 Feb 2008 17:26

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby johjoh2k » 19 Apr 2008 05:14

Another mirror for download firmware:
http://www.gianni.biz/download/MSSII/coyote-3.1.28-ssh_telnet_2008-04-15.zip

List of modify:
1 - translation of all extra page in italian
http://www.gianni.biz/download/MSSII/extra_italiano.zip

2 - replacement of webadmin with PHP File Manager, that I have translated in italian, a good file manager with a shell button integrated
http://www.gianni.biz/download/MSSII/phpFileManager-0.9.4.zip
Image

-- Thanks to http://phpfm.sourceforge.net/ --

3 - some modify to layout of advanced page
Image

Some request for future update:
- integration of my translation ;-)
- installation of ftp (default OFF)
- possibility to switch ftp automatically run on-off under services
- integration of modify written by you for complex password http://www.openmss.org/forum/viewtopic.php?f=10&t=1010#p4777
- it is possible to install yum updater? I have find this three interessant pages:
Repository for Yum http://ftp.linux.org.uk/pub/linux/arm/
Information http://fedoraproject.org/wiki/Architectures/ARM/UsingRawhide
A device with Linux ARM 9 and Yum http://www.netwinder.org/yum.html
johjoh2k
Junior Member
 
Posts: 9
Joined: 10 Apr 2008 03:21

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby flox » 19 Apr 2008 16:06

johjoh2k wrote:... Some request for future update:
- integration of my translation ;-)
- installation of ftp (default OFF)
- possibility to switch ftp automatically run on-off under services
- integration of modify written by you for complex password
- it is possible to install yum updater?


These items are added to the list of planned changes: viewtopic.php?f=10&t=1016#p4764
For the phpFileManager, I notice that there's only the version 0.9.3 on Sourceforge. After verification, your version is the 0.9.3 with additional Italian translation. The 0.9.4 number confused me. I have to test this file manager. It seems interesting.

For YUM, I do not have plan to put it in the main release because there's already Optware bootstrap included (1170 packages available). However if someone want to contribute for the installation/setup/test of YUM, I can do the final packaging of a derived firmware.

Thank you for your feedback and your ideas.

--
Florent
flox
Senior Member
 
Posts: 79
Joined: 19 Feb 2008 16:30
Location: France

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby Shonk » 20 Apr 2008 03:48

having a toggle to stop mDNSResponder and syncawayd maybe even crond from auto starting in the services tab
would be nice
Shonk
Member
 
Posts: 58
Joined: 13 Feb 2008 17:26

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby sante83 » 20 Apr 2008 17:35

Is there a guide that could help me install a torrent client to this firmware?
I have browsed the forum with no success
sante83
Newbie
 
Posts: 4
Joined: 20 Apr 2008 17:29

Re: Mod fw with SSH, Telnet, Optware and advanced menus

Postby flox » 22 Apr 2008 11:35

Shonk wrote:having a toggle to stop mDNSResponder and syncawayd maybe even crond from auto starting in the services tab
would be nice

I prepare an enhancement of the Services page that will do that, and allow to configure autostart (or auto-stop) of services more easily. Hopefully it will be released later this week.

sante83 wrote:Is there a guide that could help me install a torrent client to this firmware?
I have browsed the forum with no success

You can simply bootstrap Optware, then install some torrent package (http://www.nslu2-linux.org/wiki/?n=Site ... &q=torrent)

I've successfully used "rtorrent" with wtorrent web gui. Other solutions exist.
- rtorrent is an optware package (ipkg install rtorrent).
- wtorrent is just some php script (http://www.wtorrent-project.org/)

Later we may release a variant of this firmware that would include the transmission client (merge of xarks modification).

--
Florent
flox
Senior Member
 
Posts: 79
Joined: 19 Feb 2008 16:30
Location: France

Next

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron