1

I want to get inetd daemon working on a machine running Cygwin. I know how to do this on Centos 4, but on Cygwin it does not seem to work.

Commands I tried are:

cygrunsrv -I xinetd -d "Cygwin Xinetd" -p /usr/sbin/xinetd -e CYGWIN=ntsec
cygrunsrv -S xinetd
/etc/rc.d/init.d/xinetd start

On Linux, I would just do:

/sbin/service xinetd restart

After editing my configuration file:

/etc/xinetd.d/<myAppHere>

I've created this file on Cygwin, but can't seem to figure out how to start the service.


[si-xp-pro-sp3 ~] /etc/rc.d/init.d/xinetd start
/etc/rc.d/init.d/xinetd: line 22: /etc/init.d/functions: No such file or directory
Starting xinetd: /etc/rc.d/init.d/xinetd: line 59: daemon: command not found

[si-xp-pro-sp3 ~] /usr/sbin/xinetd start
Usage: xinetd [-d] [-f config_file] [-filelog filename] [-syslog facility] [-reuse]
[-limit proc_limit] [-pidfile filename] [-logprocs limit] [-shutdownprocs limit]
[-cc interval]
slhck
  • 235,242
WilliamKF
  • 8,058

4 Answers4

3

Running /usr/bin/xinetd-config to set up xinetd should resolve these two errors:

/etc/rc.d/init.d/xinetd: line 22: /etc/init.d/functions: No such file or directory

Starting xinetd: /etc/rc.d/init.d/xinetd: line 59: daemon: command not found

Aaron
  • 31
1

Does /etc/rc.d/init.d/xinetd exist? What kind of messages do you get?

Did you try simply running xinetd or /usr/sbin/xinetd?

Simply, does not mean using "start" as an argument. Check the man page for xinetd.

Fundamentally you are confused between the usage of /etc/init.d and /usr/sbin. The init.d folder contains shell scripts that are used to automatically start server processes, but can be used manually as well. sbin contains the binaries of applications. The scripts in init.d all take arguments like start and stop, but if you want to know what arguments an sbin binary takes, you have to read the man page.

When I said simpy run xinetd, I meant to type in the following shell command.

xinetd

and if that doesn't work, then try

/usr/sbin/xinetd

When you put spurious arguments on the command line, xinetd gets confused and doesn't even try to startup.

1

cygrunsrv does most of the magic but your Windows file system permissions need to be open.

This is more than just doing ls -l

You have to do this via CMD.EXE or, easier, through the EXPLORER.EXE GUI.

You specifically need to open for FULL CONTROL for SYSTEM the following directories (folders):

C:\CYGWIN
C:\CYGWIN\VAR
C:\CYGWIN\VAR\LOG

Select file properties on each of these and look for the Security tab.

If there is no Security tab, you have "Simple File Sharing". Turn that off with Tools -> Folder Options -> View then scroll to the very last checkbox: [ ] Use simple file sharing (recommended)

Make sure that is UNCHECKED - then you should be able to get too the Security tab for each folder.

Make sure that SYSTEM is listed under the Group or user names. Add it if not. Then make sure that when SYSTEM is highlighted that Full Control Allow is checked.

See this link for a discussion of this issue with sshd - http://www.noah.org/ssh/cygwin-sshd.html

lcbrevard
  • 578
  • 1
  • 6
  • 22
0

Here is how:

xinetd-config
cygrunsrv -I xinetd -p /usr/sbin/xinetd -d 'CYGWIN xinetd' -a '-stayalive -pidfile /var/run/xinetd.pid'
cygrunsrv -S xinetd
hawkeye
  • 615