Space Invaded
Die dritte Temporary Space Invasion kann beginnen.
tar -xvzf ../KoboRoot.tgz ./etc/init.d/rcS ./etc/inetd.conf ./etc/inittabIn the Package for my device there is no /etc/inittab included, so I had to trust the files I found in the net. Get inetd to listen on port 23 and run telnet - add to etc/inetd.conf:
23 stream tcp nowait root /bin/busybox telnetd -iThe standard firmware does not mount /dev/pts which is necessary for telnet. I added to etc/init.d/rcS just below the other mount-lines:
mkdir -p /dev/pts mount -t devpts devpts /dev/ptsAnd finally we need to make sure inetd gets started. Add to etc/inittab:
::respawn:/usr/sbin/inetd -f /etc/inetd.confor like I did just create the etc/inittab
::sysinit:/etc/init.d/rcS ::respawn:/sbin/getty -L ttymxc0 115200 vt100 ::ctrlaltdel:/sbin/reboot ::shutdown:/bin/umount -a -r ::restart:/sbin/init ::respawn:/usr/sbin/inetd -f /etc/inetd.confTar this into a KoboRoot.tgz and put the file into .kobo on your device. After disconnecting USB it will install it and reboot. Turn on Wifi in the settings and start the Browser (it enables Wifi only on demand, starting the browser makes sure it really does) and you should be able to connect via telnet as root without password. The kobo is wide open now, do this only in a secure network.
mkdir d cd d ar x ../dropbear*.deb data.tar.gz tar xzf data.tar.gz tar -cvzf ../KoboRoot.tgz usr/{bin,lib,sbin}Copy the KoboRoot.tgz into .kobo of the reader and let it install and reboot again. Then connect via telnet to set it up:
# add the private key(s) for the box(es) you want to connect from mkdir -p /root/.ssh echo "your key" >> /root/.ssh/authorized_keys # create host key mkdir -p /etc/dropbear cd /etc/dropbear test -f rsa_host_key || dropbearkey -t rsa -f rsa_host_key test -f dss_host_key || dropbearkey -t dss -f dss_host_key # dropbear complains if this is not present touch /var/log/lastlog # edit /etc/passwd vi /etc/passwdHere we need to disable the login without password and change root's home directory from / to /root.
root:x:0:0:root:/root:/bin/shYou could also set a password for root, but for me it's fine to have pubkey access only. In the passwd file there is a second root user "admin" with password "admin". I don't know yet if it's used for something and if it's safe to delete it. Now we can try dropbear:
/usr/sbin/dropbear -d /etc/dropbear/dss_host_key -r /etc/dropbear/rsa_host_key -F -s -ETry to login via ssh. Maybe there are some permissions to change. If this is successful add dropbear to /etc/inittab:
::respawn:/usr/sbin/dropbear -d /etc/dropbear/dss_host_key -r /etc/dropbear/rsa_host_key -F -sand remove the previously added line for inetd (telnet).
ar x rsync_*.deb data.tar.gz mkdir rsync cd rsync tar -xvzf ../data.tar.gz scp usr/bin/rsync root@kobo:/usr/bin/ cd .. ar x libpopt0_*.deb data.tar.gz mkdir libpopt cd libpopt tar -xvzf ../data.tar.gz scp scp lib/libpopt.so.0.0.0 root@kobo:/lib/and on the Kobo:
cd /lib ln -s libpopt.so.0.0.0 libpopt.so.0and rsync works:
[root@(none) ~]# rsync --version rsync version 3.0.9 protocol version 30 Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints, socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append, ACLs, xattrs, iconv, symtimes rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details.some Kobo hacking resources: