Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Trouble running the Interix versions of telnetd and rshd as Windows services

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> Trouble running the Interix versions of telnetd and rshd as Windows services Page: [1]
Login
Message << Older Topic   Newer Topic >>
Trouble running the Interix versions of telnetd and rsh... - May 7, '04, 2:39:32 PM   
ag

 

Posts: 4
Joined: May 7, '04,
Status: offline
I'm trying to run the Interix versions of telnetd and rshd as Windows services. Here is what I have done so far:

1. Disabled Telnet Server and Remote Shell services. Made sure their status is "Disabled" in Services panel.

2. Uncommented the following lines in /etc/inetd.conf

telnet stream tcp nowait NULL /usr/sbin/in.telnetd in.telnetd -i
shell stream tcp nowait NULL /usr/sbin/in.rshd in.rshd -a

3. Moved /etc/rc2.d/S32inet out of the way

4. Installed inetd as a service. Tried running it as "Local System Account" and as a User with Administrator rights on the box. Made sure inetd shows up as "Started" "Automatic" in Services panel

5. Made sure Interix Subsystem Startup shows up as "Started" "Automatic" in Services panel.

6. ps -ef show that both inetd and init processes are running:

% ps -ef | grep in
+SYSTEM 193 1 13:50:14 - 0:00.00 /usr/sbin/zzInterix -s
<nistrator 385 1 13:50:15 - 0:00.04 /usr/sbin/init
<nistrator 1665 1 13:50:15 - 0:00.00 /usr/sbin/cron
+SYSTEM 1923 1 14:00:09 - 0:00.00 /usr/sbin/inetd -s

7. When I try to telnet, I get "Connection refused". If I start in.telnetd from command line, I get in no problem:

% telnet localhost
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
% /usr/sbin/in.telnetd &
[1] 1479
% telnet localhost
Trying 127.0.0.1...
Connected to myxpbox.mydomain.com
Escape character is '^]'.


Interix 3.5 (myxpbox) (ttyp0)

NOTE:
The default NT Domain used during login is identified within
the parentheses of the login prompt below "(MyDomain)".
If there is no default value or if you want to login using a
different NT Domain then ensure that a Domain name is prefixed
to the login name in the form of DomainName+loginName

(MyDomain) login: ag
Password:
Copyright (c) Microsoft Corporation. All rights reserved.

Welcome to the Interix UNIX utilities.

DISPLAY=localhost:0.0
$

What am I missing? This is taking place on Microsoft Windows XP Professional Version 2002 Service Pack 1.

Thanks.
Post #: 1
RE: Trouble running the Interix versions of telnetd and... - May 7, '04, 3:10:22 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
DON'T DO THIS.

There is no need to set these under the Win32 services.
About 7 years ago I ported telnetd & inetd to OpenNT (the previous name
of Interix) and added an option for it to be run under Services.
This was done because at that time there was no "init"-like startup
which exists now. So there is zero need to run telnetd or inetd under
Win32 services.

Why are you trying to this?
I think you may trying to set something up, but are misunderstanding something.
Please tell us "why" and then we can get you pointed in the right direction.

(in reply to ag)
Post #: 2
RE: Trouble running the Interix versions of telnetd and... - May 7, '04, 3:28:50 PM   
ag

 

Posts: 4
Joined: May 7, '04,
Status: offline
I'm doing this following the instructions found under:

Windows services for Unix -> Interix Overview -> How To -> Run the Interix versions of telnetd and rshd as Windows services :

-------------------------------------------------------------------------------------

To run the Interix versions of telnetd and rshd as Windows services
Open Control Panel, open Administrative Tools, open Services, and then disable Telnet Server and Remote Shell Service.
Edit the /etc/inetd.conf file to enable the Interix versions of telnetd(1) and rshd(1) by removing the pound sign (#) from the following lines:

#telnet stream tcp nowait NULL /usr/sbin/in.telnetd in.telnetd -i
#shell stream tcp nowait NULL /usr/sbin/in.rshd in.rshd -a

Start an Interix command shell.
To prevent inetd from running as a daemon, at the shell prompt type:
cd /etc/rsh2.d
mv S32inet X32inet

The number in the file name might differ on your computer.

To install inetd as a service, at the shell prompt type:
service install -u username -s auto -p password /usr/sbin/inetd -s

To start inetd as a service, at the shell prompt, type:
service start inetd

-------------------------------------------------------------------------

Please, note that I'm NOT trying to run telnetd and rshd as SEPARATE win32 services. I want them triggered by inetd the same way it works in Unix world. I do want inetd to run as win32 service with domain user logon to allow access to windows network resources. I used the same terminology as in the above instructions which was misleading. Sorry.

P.S. I figured out the problem. /etc/inetd.conf had wrong user and group ownership. Running /usr/sbin/inetd -d made it obvious.

Thanks.

(in reply to Rodney)
Post #: 3
RE: Trouble running the Interix versions of telnetd and... - May 7, '04, 4:40:43 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
The instructions for running inetd are correct.
They are just unnecessary with the "init" procedure available now.

At boot the Interix subsystem is started and the "init" procedure
happens. The scripts in /etc/init.d are run with "start" as the
arguement to each. SFU ships with the Interix inetd.conf having telnetd
et al. commented out so they don't automatically run.

All you need to do to start them is uncomment the daemons you want to
run in the /etc/inetd.conf file. Then send a SIGHUP to the running inetd
process. Inetd should be running as the Administrator.

I doubt that /etc/inetd.conf has the wrong user/group on it. The file
perms on it are likely fine too. It is set to be accessed by the
Administrator and members of the Administrators group (which Administrator
is a member of).

Inetd will run the same as on Unix (it's the same code). Running it as I've
described will allow users who login access to windows network resources.
The best way for the logged in user to access network files is through
the "/net" filesystem. Those filesystems that are mounted to drive letters
(i.e. C:) can be accessed via /dev/fs/X/...

(in reply to ag)
Post #: 4
RE: Trouble running the Interix versions of telnetd and... - May 7, '04, 4:56:57 PM   
ag

 

Posts: 4
Joined: May 7, '04,
Status: offline
You are right - I disabled inetd windows service, put S32inet back in place, rebooted and got inetd running and triggering in.telnetd this time. Windows network resources are available. So, I'm all set with this. Thanks!

(in reply to Rodney)
Post #: 5
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 7:57:49 PM   
sendep

 

Posts: 14
Joined: May 16, '04,
Status: offline
i'm still having trouble getting telnetd to run, i can run it manually but none of my uncommented services are running from the init script, i really just want ftpd and telnetd.

(in reply to ag)
Post #: 6
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 9:19:00 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
After you uncomment the daemons that you want to run in the /etc/inetd.conf
file you need to SIGHUP the inetd process. This causes the file to be re-read
by the inetd process. You should be a user with the right privilege to send a signal
to the inetd process which is running as the user Administrator.

(in reply to sendep)
Post #: 7
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 9:56:25 PM   
sendep

 

Posts: 14
Joined: May 16, '04,
Status: offline
yea, right....i did that...still nothing. and rebooting doesnt help either. the init as far as i can tell the init process just isnt calling inetd, because its not running at all. ever. i cant HUP it if its not running in the first place.

< Message edited by sendep -- May 16, '04, 9:56:35 PM >

(in reply to Rodney)
Post #: 8
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 11:15:13 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
ah, okay. You didn't give us any details.
Look for the files /etc/init.d/inet and /etc/rc2.d/S32inet.
Please confirm whether these files are there or not.

If one or both are missing then someone has been messing around with
the start up (init) scripts. If both files are there then someone has
changed the content which is likely causing things to not run.

(in reply to sendep)
Post #: 9
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 11:18:14 PM   
sendep

 

Posts: 14
Joined: May 16, '04,
Status: offline
yes they are both there, this install of SFU is only min old...and i just uninstalled and reinstalled.

(in reply to Rodney)
Post #: 10
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 11:29:43 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
So with this fresh install if you do a 'ps -A | grep inet' you get no result, right?
But you are able to start a shell (ksh, csh, ...) and do other things, right?

Did you edit the /etc/inted.conf file using vi from an Interix ksh or
csh? If you edited it from a Win32 editor you likely mucked the file up. Win32
editors add an extra '\r' on the ends of lines (which is not the Unix way).

On another tact:
What is the output from 'ls -l' on /etc/inetd.conf and /usr/sbin/inetd.

(in reply to sendep)
Post #: 11
RE: Trouble running the Interix versions of telnetd and... - May 16, '04, 11:45:43 PM   
sendep

 

Posts: 14
Joined: May 16, '04,
Status: offline
> ps -A | grep inet
>
> ls -l /etc/inetd.conf
-rw-rw-r-- 1 Administrator +Administrators 5393 May 16 19:15 /etc/inetd.conf


> ls -la /usr/sbin/inetd
-rwxrwxr-x 1 Administrator +Administrators 110080 Nov 8 2003 /usr/sbin/inetd

> whoami
ibanez

(in reply to Rodney)
Post #: 12
RE: Trouble running the Interix versions of telnetd and... - May 17, '04, 12:01:50 AM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
/usr/sbin/inetd looks right.

/etc/inetd.conf has a big change in the number of bytes from
the original by 113 bytes. That's way too much if all you did
was uncomment two lines (telnet & ftp).
Did you edit the file using a Win32 editor?
When you edited did you do more than just delete two "#" characters?

(in reply to sendep)
Post #: 13
RE: Trouble running the Interix versions of telnetd and... - May 17, '04, 12:10:25 AM   
sendep

 

Posts: 14
Joined: May 16, '04,
Status: offline
i did, but i thought i used one that didnt use funky characters. i used notepad as i cant stand VI.

(in reply to Rodney)
Post #: 14
RE: Trouble running the Interix versions of telnetd and... - May 17, '04, 1:45:38 AM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
If you use NOTEPAD, then you have to run "flip -u /etc/inetd.conf" to convert it back to UNIX format.
Or use /bin/ed or /bin/vi.

Then sig HUP the inetd process again.

(in reply to sendep)
Post #: 15
RE: Trouble running the Interix versions of telnetd and... - May 17, '04, 1:46:45 AM   
sendep

 

Posts: 14
Joined: May 16, '04,
Status: offline
yea, but how do i start it if it isnt already running.

(in reply to markfunk)
Post #: 16
RE: Trouble running the Interix versions of telnetd and... - May 17, '04, 10:23:35 AM   
markfunk

 

Posts: 673
Joined: Mar. 31, '03,
Status: offline
The easiest way is to do (as local Administrator only) in a ksh shell:
$ cd /etc/init.d
$ sh inet stop
$ sh inet start

(in reply to sendep)
Post #: 17
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> Trouble running the Interix versions of telnetd and rshd as Windows services Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047