Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Erdely, Michael" To: "Cygwin List" Subject: RE: HOWTO setup ftpd and telnetd Date: Wed, 22 Nov 2000 17:07:55 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <3A1C4016.49941AF2@mmm.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 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\\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 AT sources DOT redhat DOT com [mailto:cygwin-owner AT sources DOT redhat DOT com]On Behalf Of Michael Bresnahan Sent: Wednesday, November 22, 2000 4:52 PM To: cygwin AT sourceware DOT cygnus DOT 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\\usr\sbin\inetd.exe: "ntsec" where 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 AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com