Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-14-2012, 08:04 AM   #1
sysKin
Connoisseur
sysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the end
 
sysKin's Avatar
 
Posts: 54
Karma: 31286
Join Date: Oct 2012
Location: Australia
Device: finally, a Glo!
I can't make Telnet work, halp~

Hi,
I'm trying to add Telnet access to my Glo, but for some reason it doesn't work. inetd starts, ftp server works perfectly, but telnet just closes connection immediately after trying to connect.

This is what I've done:
.kobo/koboplugins.ini
Code:
Telnet On=Plugin::executeSystemCmd("/bin/sh /mnt/onboard/.kobo/telnet.sh")
Using the 14/11/2012 version of kobo plugin (great stuff, thanks!) to make this button work.

.kobo/telnet.sh
Code:
#!/bin/sh
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
/usr/sbin/inetd /mnt/onboard/.kobo/inetd.conf
.kobo/inetd.conf
Code:
21 stream tcp nowait root /bin/busybox ftpd -w -S  /
23 stream tcp nowait root /bin/busybox telnetd -i
So, what can possibly make ftp work but not telnet? What's the best way to debug this?

Thanks ~
sysKin is offline   Reply With Quote
Old 12-14-2012, 08:17 AM   #2
ah-
Connoisseur
ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.
 
Posts: 64
Karma: 3062
Join Date: Jan 2012
Device: Kobo Touch
I'm not sure but it might be that the home folder for the user you're trying to log in as doesn't exist.
ah- is offline   Reply With Quote
Old 12-14-2012, 09:28 AM   #3
sysKin
Connoisseur
sysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the end
 
sysKin's Avatar
 
Posts: 54
Karma: 31286
Join Date: Oct 2012
Location: Australia
Device: finally, a Glo!
Quote:
Originally Posted by ah- View Post
I'm not sure but it might be that the home folder for the user you're trying to log in as doesn't exist.
Interesting point indeed.
However, I think it's not the case (hard to be sure without actually being logged in): /etc/passwd configures root's home directory as simply /
Other guides for setting up telnet don't mention any root home directory's manipulation either.
Can you think of a way to check if home directory might be the problem?

I'm personally suspecting /dev/pts right now: the script I used creates it and mounts it, but I see fstab is *also* mounting it. Is this expected?
Using ftp, I do see /dev/pts as "/dev/pts?" (question mark in the file name). Is that expected?

Last edited by sysKin; 12-14-2012 at 09:33 AM.
sysKin is offline   Reply With Quote
Old 12-14-2012, 11:39 AM   #4
xor_
Enthusiast
xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.
 
Posts: 46
Karma: 20894
Join Date: Nov 2012
Device: Nook ST, Kobo Glo
Quote:
Originally Posted by sysKin View Post
Using ftp, I do see /dev/pts as "/dev/pts?" (question mark in the file name). Is that expected?
[root@(none) pts]# ls -l /dev/pts
total 0
crw------- 1 root root 136, 0 Dec 14 17:27 0


FWIW, I tried something similar a couple of days ago, with the same result.

The wiki page method of enabling telnet works, though. But, clearly, having a telnet server running without a root password isn't a winning long-term proposition. So I generated a password hash with mkpasswd and inserted it into /etc/passwd. (No passwd program on the box).

Last edited by xor_; 12-14-2012 at 05:44 PM.
xor_ is offline   Reply With Quote
Old 12-14-2012, 10:10 PM   #5
sysKin
Connoisseur
sysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the end
 
sysKin's Avatar
 
Posts: 54
Karma: 31286
Join Date: Oct 2012
Location: Australia
Device: finally, a Glo!
Quote:
Originally Posted by xor_ View Post
FWIW, I tried something similar a couple of days ago, with the same result.

The wiki page method of enabling telnet works, though. But, clearly, having a telnet server running without a root password isn't a winning long-term proposition. So I generated a password hash with mkpasswd and inserted it into /etc/passwd. (No passwd program on the box).
Sorry, I'm not sure I understand: are you saying that telnet didn't work, but then you added a password and it started to work? (I'm just slightly confused by the "long term" part).

My only other linux device at home is my router, let's see if it has mkpasswd...

Last edited by sysKin; 12-14-2012 at 10:17 PM.
sysKin is offline   Reply With Quote
Old 12-15-2012, 04:44 AM   #6
xor_
Enthusiast
xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.xor_ can self-interpret dreams as they happen.
 
Posts: 46
Karma: 20894
Join Date: Nov 2012
Device: Nook ST, Kobo Glo
Quote:
Originally Posted by sysKin View Post
Sorry, I'm not sure I understand: are you saying that telnet didn't work, but then you added a password and it started to work? (I'm just slightly confused by the "long term" part).
No, those were two different statements.

a) First I tried starting telnet through the plugin, which didn't work. Same symptom as you had, connection closing immediately.
Then I did it exactly as specified in the Wiki page, i.e., starting it through /etc/inittab. That worked.

b) In general it's not a very good idea to have a telnetd runnning without having set a root password. Imagine using your Kobo in some random open wifi spot... Big security risk. (It's still a security risk with a password, BTW, since telnet passwords are transferred unencrypted. I will try to get dropbear SSH running)

Quote:
My only other linux device at home is my router, let's see if it has mkpasswd...
If you don't have it, I think openssl also has a commandline switch to do it.

Last edited by xor_; 12-15-2012 at 04:59 AM.
xor_ is offline   Reply With Quote
Old 12-15-2012, 06:25 AM   #7
sysKin
Connoisseur
sysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the endsysKin knows the complete value of PI to the end
 
sysKin's Avatar
 
Posts: 54
Karma: 31286
Join Date: Oct 2012
Location: Australia
Device: finally, a Glo!
Quote:
Originally Posted by xor_ View Post
a) First I tried starting telnet through the plugin, which didn't work. Same symptom as you had, connection closing immediately.
Then I did it exactly as specified in the Wiki page, i.e., starting it through /etc/inittab. That worked.
Ah I see, thanks. Indeed I just did the same (ftp access made it much easier) and yeah, it works.

Quote:
b) In general it's not a very good idea to have a telnetd runnning without having set a root password
True... this is why I wanted it switchable from the plugin (one button to start it, one button to kill it). I'll work some more to see if I can make it happen. In the meantime, thanks!

[edit] alrighty, I think I got it: mounting /dev/pts was broken. It seems like it works great from rcS, but not when spawned from manual script (at least not the way I explained in first post).
Now that I did what the wiki says for rcS, and my .sh is just starting inetd, it works!

Last edited by sysKin; 12-15-2012 at 06:33 AM.
sysKin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-T1 Make my Reader work dienton Sony Reader Dev Corner 0 02-07-2012 07:04 PM
Firmware Update I have the US 2.5 bin but can't make it work! Please help leodavilgen Amazon Kindle 14 05-15-2010 08:02 PM
iLiad Reader - cannot make it work dicky.woollard Introduce Yourself 2 01-06-2009 07:46 AM
Avantgo: Can't Make It Work! Sculptedstylus Reading and Management 2 02-24-2006 01:11 PM


All times are GMT -4. The time now is 07:52 PM.


MobileRead.com is a privately owned, operated and funded community.