This is the mail archive of the cygwin 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]
Other format: [Raw text]

RE: Win2003 server and cron/sshd as services (1.5.19)

> mdunn@h-dlt ~
> $ cygrunsrv -I sshd --shutdown -p /usr/sbin/sshd -a "-D -ddd" \
>    -d "CYGWIN  sshd" -u sshd_server -w a_fine_password -e 
>    "CYGWIN=binmode ntsec tty"

1. I assume that you meant to provide a "\" after '-e' in the
   second line of your command above, correct?

2. In my earlier code, I had provided the following option to
   the cygrunsrv program: --args "-D"

   Note the double quotes around the '-D', above.  I never would
   have suspected it, but those double quotes -- when used to
   install the cron service -- will cause cygrunsrv to fail when
   attempting to start cron.  This surprised me because I use
   the double quotes around '-D' when starting sshd.  In the case
   of starting 'sshd' the double quotes do not cause any problem.
   Going forward, for consistency, I have no quotes around '-D'
   for either 'cron' or 'sshd'.

   Can anyone else on the Cygwin mailing list test this behavior?
   Here are the prerequisites:  Windows 2003 and an 'sshd_server'
   user account in your /etc/passwd (usually created by the script
   named 'ssh-host-config'), with a corresponding password for that
   special user account.

   The following command consistently fails:

   cygrunsrv --install cron --path /usr/sbin/cron --shutdown --args "-D"
    --disp "Cygwin cron" --desc "Cygwin vixie-cron service" \
    --user sshd_server --passwd your-fine-password;

   The following command consistently works:

   cygrunsrv --install cron --path /usr/sbin/cron --shutdown --args -D \
    --disp "Cygwin cron" --desc "Cygwin vixie-cron service" \
    --user sshd_server --passwd your-fine-password;

3. If you are still not getting cron to start, then I would
   suspect that the password you are entering for the special
   account 'sshd_server' is incorrect.  Here are some steps 
   you could try to confirm the password:

   a. Log off your Windows account
   b. At the Windows login dialog, enter 'sshd_server' in the
      'User name' field.
   c. Enter the password for this account (do NOT press [Enter]
      or click on 'OK').
   d. In the 'Log on to' field, select the 'hostname' (this computer)
      value so that you are NOT logging on to your local network, if
   e. Click on 'OK' or press [Enter].

   If the error message:

    "The system could not log you on.  Make sure your User name
     and domain are correct, then type your password again"

   is displayed, then either you typed the wrong password or your
   knowledge of the password is incorrect.

   If the error message:

    "The local policy of this system does not permit you to
     logon interactively" 

   is displayed, then your knowledge of the 'sshd_server' user
   account's password is correct.

Unsubscribe info:
Problem reports:

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