Author Topic: Resolution to ftp & telnet problems with tkcROM 2.5.1  (Read 2514 times)

raybert

  • Full Member
  • ***
  • Posts: 233
    • View Profile
Resolution to ftp & telnet problems with tkcROM 2.5.1
« on: February 25, 2004, 10:43:52 pm »
Some of you may have noticed (in another thread) that I was having some trouble getting ftp and telnet to work with tkcROM 2.5.1 on my c860.  Well, I just found a solution to the ftp problem and perhaps an explanation for the telnet problem.

First, ftp: I couldn\'t login at all.  The server insisted on having a password, even though I have none set.  Some folks suggested setting a password, but I preferred not to have one and never got around to trying it.

I was snooping around earlier looking at some ipkg stuff when I noticed there is a set of ipkg info files in /usr/lib/ipkg/info for the troll-ftpd server; yet, I never installed it.  It turns out that proto must have pre-installed it.  BUT, it\'s not installed correctly: inetd.conf is NOT updated to execute it!  Instead, inetd is executing /usr/sbin/in.ftpd.  I *think* that is the wu-ftp server, which is consistent with the existence of /etc/ftpaccess and friends.

So, I decided to modify inetd.conf to run troll-ftpd instead.  This worked like a charm!  I can now login to ftp as either root or zaurus with no password.

For those who need to know how to do this: load /etc/inetd.conf in your favorite text editor and find the line that looks like this:

Quote
ftp stream tcp nowait root /usr/sbin/in.ftpd -l -a

and change it to:

Quote
ftp stream tcp nowait root /usr/sbin/ftpd

You can then either restart inetd or reboot.

Remember that this exact procedure will work only on tkcROM 2.5.1.


As for telnet, the problem I\'ve been having is that I cannot execute su when I login as zaurus (the error is \"su: BusyBox binary has insufficient rights to set proper UID for applet!\").  I CAN, however, login as root.  This is workable I suppose, but a little inconvenient.

I was always able to become root on my 5500 (with tkcROM 1.x) with no trouble at all.  After comparing the two systems, I suspect the problem is that the group ID of \"/bin/busybox\" is set to \"users\" instead of \"root\" (as it is on my 5500).  I\'ve noticed that many of the system binaries are set this way.  I\'m wondering if proto did this on purpose for security?  I\'m not sure I like it, in any case.

I\'m not quite sure how this works though: su is not in busybox, it\'s in tinylogin (which has the same permissions as busybox).  So, I tried copying tinylogin to my home dir and giving it the proper permissions, etc., and I run it as such: \"./tinylogin su\".  But I still get the busybox error!

Likewise, the telnet server that\'s running is /usr/sbin/in.telnetd, and it also has a GUID of users.  So I tried copying it to my home dir and setting it\'s GUID, etc., and then changing inetd.conf to run the copy instead, but I still get the same busybox error.

I\'m not sure how busybox actually figures into this.  Is tinylogin running busybox for some reason?

I guess the answer to this is probably obvious to someone out there, but I\'m not enough of a linux expert yet to see it myself.

But at least I\'ve got ftp working again!

~ray

pakman

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Resolution to ftp & telnet problems with tkcROM 2.5.1
« Reply #1 on: March 14, 2004, 04:40:26 pm »
Hi,

I\'ve just switched to the tkcROM, and hit the telnet/su problem as well. It happens because the tinylogin binary does not have its suid bit set. To fix this, do the following in the console as root:

Code: [Select]
mount -o rw,remount /

chmod u+s /bin/tinylogin

mount -o ro,remount /


Usual disclaimers apply - do this at your own risk. There may be a good reason for this not being already done in the tkcROM.

The ftp problem also existed in the Sharp ROM - I fixed it in a similar way to raybert, but with pure-ftp rather than troll ftp. I had a problem with troll ftp, but I can\'t remember what it was now. If you use pure ftp, the relevant line in /etc/inetd.conf needs to be:

Code: [Select]
ftp stream tcp nowait root /usr/sbin/pure-ftpd

Regards,
P.
Now: Gemini 4G/Android. Previously: Zaurus C760/Cacko lite 1.23

Anonymous

  • Guest
Resolution to ftp & telnet problems with tkcROM 2.5.1
« Reply #2 on: March 14, 2004, 06:02:31 pm »
Strange I haven\'t got troll-ftp installed or the ipkg info for this on my tkc2.5.1. Anyone else ?

Richard

raybert

  • Full Member
  • ***
  • Posts: 233
    • View Profile
Resolution to ftp & telnet problems with tkcROM 2.5.1
« Reply #3 on: March 15, 2004, 10:57:56 am »
pakman: thanks for posting that!  I saw something similar posted elsewhere and I was planning to try that to fix this problem; hadn\'t gotten around to it yet.  I tried your commands and they worked great!  (Fixed the same problem in ssh too.)  Thanks!

Guest: it\'s there but it\'s not installed correctly so ipkg doesn\'t know about it.  Look for /usr/lib/ipkg/info/troll-ftp* and /usr/sbin/ftpd

~ray