DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-03-26 23:47:26

hans66
New member
Registered: 2007-03-21
Posts: 4

OT: LaCie EDMini V2

Slightly Off Topic..., but maybe it fits somewhere.

I got myself a LaCie EDmini V2, which is hardware wise very similar to the DNS-323 (same processor, ethernet, but no fun_plug).

I got telnet, dropbear and chrooted debian-etch running. If anyone is interested, I can post the instructions.

One problem I still have: I cannot get SSHD on debian etch started automatically.
I created an init script (debian-ssh) which basically calls "/bin/chroot /home/debian /etc/init.d/ssh start"
When I call this script from a telnet shell, sshd starts fine.
When I reboot the EDmini, the scripts are executed, but sshd is killed when debian-ssh script is exit-ed.
Any clue?

Offline

 

#2 2007-03-28 00:46:49

PerS
Member
Registered: 2007-03-16
Posts: 13
Website

Re: OT: LaCie EDMini V2

hans66 wrote:

Slightly Off Topic..., but maybe it fits somewhere.
One problem I still have: I cannot get SSHD on debian etch started automatically.
I created an init script (debian-ssh) which basically calls "/bin/chroot /home/debian /etc/init.d/ssh start"
When I call this script from a telnet shell, sshd starts fine.
When I reboot the EDmini, the scripts are executed, but sshd is killed when debian-ssh script is exit-ed.
Any clue?

Instead of using your debian-ssh script, in debian do the following:

Code:

update-rc.d ssh defaults

It will create the needed start and stop scripts

Offline

 

#3 2007-03-28 19:57:43

hans66
New member
Registered: 2007-03-21
Posts: 4

Re: OT: LaCie EDMini V2

I have de default debian init scripts installed, eg ssh.
However, when you chroot to debian, these do not get called automatically.

From an init script from the EDMini /etc/init.d/debian-ssh, I chroot to debian by calling:
/bin/chroot /home/debian /etc/init.d/ssh start
the last argument should run the debian ssh script.

I've done some debugging. All scripts do get called..sshd does actualy started (I put a ps -ef in debian-ssh...but sshd is gone before debian-ssh exits

Running debain-ssh from a telnet shell, everything works fine...so..I am clueless sofar wink

Offline

 

#4 2007-03-29 17:37:51

hans66
New member
Registered: 2007-03-21
Posts: 4

Re: OT: LaCie EDMini V2

Problem solved, although I don't understand the solution wink

I also started utelnetd via a init script. For some reason, dropbear or openssh in a chroot etch do not want to start via an init scipt. Both were starting after utelnetd was starting.

If I put dropbear or openssh in a chroot etch init script before utelnetd, both start, but utelnetd doesn't.

I don't want telnet, it was just for modifying the box. Problem solved. Just don't understand why it happened.

Offline

 

#5 2007-04-11 14:39:22

flamspower
New member
Registered: 2007-04-11
Posts: 2

Re: OT: LaCie EDMini V2

Hello hans66,

I have a LaCie edmini v2 and I'm looking for quite a long time if someone was able to modify the embedded Linux OS to allow the harddrive to shutdown automatically after a defined idle period.

I can see that you were able to do some mods on this NAS; starting from your work, do you think there is a possibility to implement the above functionality?

More generally, I would be very interested by how to make the mods you have done.

Best Regards.

Offline

 

#6 2007-04-11 22:25:05

hans66
New member
Registered: 2007-03-21
Posts: 4

Re: OT: LaCie EDMini V2

Hi

On the HD shutdown. There is an initscript hardiskparams which uses smartctl --setstandbytimer. I couldn't find and documentation on internet, but it is a bit documented on the EdMini. However, didn't help...disk keeps spinning. Even after I turn off all services I don't need.
So...if you are more lucky, let me know.

Below notes on mods I did. not 100% accurate..and assumes some linux common sense, like setting the proper file ownerships etc etc.
Most of the things I have done is combination of info I found on Edmini v1 (different processor) and on the 323. Most binaries used are from 323 downloads.

0. Open box, void warranty, connect to PC, Backup all partions & bootsector, except data partion. Might be also handy in case HD crashes later on.....
1. Install exploit in /www/cgi-bin/admin:

  #!/bin/sh
  echo "Content-type: text/plain"
  echo ""
  eval $QUERY_STRING

Search on Edmini v1 mods for details....

Don't forget to chmod 755 and chown root.root

Copy utelnetd, dropbear to box. Create /etc/dropbear
Make sure all permissions are set OK!
some file to be copied to part7 & part8!
Assemble box, Add user for samba share (via smb share you can add binaries)
Add new admin ("root1" with root passwd)
copy via exploit /etc/shadow and passwd to smb share. Edit such that root1 passwd is copied to root, give root a shell. copy shadow/passwd back (needed for telnet login)
start via exploit utelnet script (which inits tty, pty....)
#Add dropbear and telnet link in rc3.d  (later)
Mount SMB on linux box
Edit passwd, add sh access to root and user
Edit shadow. Copy user passwd to root
Copy via exploit passwd & shadow back to /etc
dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
make chroot link to busybox
11. It seems that part9/snapshots/00/contains updates which are copied during boot
11. chroot etch (grab etch from net. The link is somewhere)
# Update packages
apt-get update
apt-get dist-upgrade

don’t forget to edit your /etc/resolv.conf file first! | sample
# make root password
passwd root
apt-get intall ssh
apt-get telnet

Hope it helps...its not not 100% complete...sorry!

Offline

 

#7 2007-04-11 23:31:08

flamspower
New member
Registered: 2007-04-11
Posts: 2

Re: OT: LaCie EDMini V2

Thank you very much for all info! I'll try all of this asap!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB