This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: HOWTO setup ftpd and telnetd


A few notes:
/bin/iu-config will create the ftpusers, ftpwelcome, inetd.conf, motd and
shells file.  You can edit them to comment out services, shells, . . . that
you don't want.

I've used both SSHD and TELNETD with INETD and have never had to make the
registry change to "HKEY_LOCAL_MACHINE\Software\Cygnus
Solutions\Cygwin\Program
Options\<CYGWIN_HOME>\usr\sbin\inetd.exe" that you mention.  Setting the
System-Wide CYGWIN variable in the System Control Panel applet has always
worked well for me.

Other than that, the HOWTO looks pretty good.

-ME

-----Original Message-----
From: cygwin-owner@sources.redhat.com
[mailto:cygwin-owner@sources.redhat.com]On Behalf Of Michael Bresnahan
Sent: Wednesday, November 22, 2000 4:52 PM
To: cygwin@sourceware.cygnus.com
Subject: HOWTO setup ftpd and telnetd


After several hours of work I have finally gotten ftpd and telnetd to
work on my NT 4.0 box.  In the hopes of saving someone else a lot of
time, I am posting my steps here.  Some of these steps are recalled from
my memory and I have not repeated the steps on a clean box to verify
their correctness.

Preconditions:
    - A properly working release of cygwin is installed that includes
the inetutils and login packages.  This is a no brainer if you use the
Cygwin setup tool.
    - A working knowlege of Cygwin.
    - A working knowlege of Windows NT.
    - A working knowlege of the regedit utility.
    - inetd has NOT been installed previously.
    - A limited knowlege of UNIX system administration
    - You've read /usr/doc/Cygwin/inetutils-1.3.2.README.

Step 1) Set the CYGWIN environment variable.  Using the system control
panel (Start -> Settings -> Control Panel -> System), set the
environment variable CYGWIN to "ntsec".  This is documented in
/usr/doc/Cygwin/inetutils-1.3.2.README.

[NOTE: you may want to add other things to the variable.  CYGWIN is used
to configure the whole cygwin system.  By default, nothing else is set
and I do not have an understanding of any of the other options, so I
stuck with straight "ntsec".]

Step 2) Add an odd entry to the NT registry.  Using regedit (or other
tool), add the following registry value:

HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\Program
Options\<CYGWIN_HOME>\usr\sbin\inetd.exe:    "ntsec"

where <CYGWIN_HOME> is the path to the Cywin installation (C:\Cygwin on
my box).

[NOTE: this step may be redundant.  Step 1 may be all that is needed or
vice versa Step 2 may be all that is needed, however I did both, so I am
listing both here.]

[See note in step 1 about adding additional parameters.]

This is documented in /usr/doc/Cygwin/inetutils-1.3.2.README, but the
wording was unclear to me.

Step 3) Install inetd as an NT service.  From the bash prompt execute:

inetd --install-as-service

This is documented in /usr/doc/Cygwin/inetutils-1.3.2.README.

Step 4) Create a /etc/passwd file.  You may already have a password
file, but if you're like me it is out of date.  From the bash prompt
execute:

mkpasswd -l >/etc/passwd

Then edit /etc/passwd with your favorite editor.  Delete all but the
users you want (e.g. nuke Guest, Everyone, Administrator).  Set each
user's home directory and shell.  These are the last two fields on each
line.  This is my password file:

usyoa028::1002:513:,S-1-5-21-1425032920-764422119-1210191635-1002:/home/usyo
a028:/usr/bin/bash

You can skip this step if you don't mind being logged into the root
directory with a /bin/sh shell. Yuk!

Step 5) Configure inetd.  Create the file /etc/inetd.conf and put the
following in it:

ftp          stream tcp nowait root /usr/sbin/in.ftpd.exe in.ftpd.exe
telnet       stream tcp nowait root /usr/sbin/in.telnetd.exe
in.telnetd.exe

This step is KEY!  Without it, nothing will work.

Step 6) Create the file /etc/shells and put all the legal shells into
it.  Mine looks like this:

/usr/bin/bash

This step is KEY!  Without it, ftpd will not work.

Step 7) Reboot!

You should be able to telnet and ftp to your NT box now.  Phew!

Good luck!

For additional sources of information check out the following cygwin man
pages:

inetd(8)
telnetd(8)
ftpd(8)

Mike Bresnahan





--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]