Re: SSHd configuration problems (System error 1376) - CONFIRMED

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Houder
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Watson, Hal M (MNIT)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Larry Hall (Cygwin)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Watson, Hal M (MNIT)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Andrey Repin
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Will Parsons-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Larry Hall (Cygwin)
In reply to this post by Watson, Hal M (MNIT)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Andrey Repin
In reply to this post by Will Parsons-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: SSHd configuration problems (System error 1376) - CONFIRMED

Watson, Hal M (MNIT)
In reply to this post by Andrey Repin
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: SSHd configuration problems (System error 1376) - CONFIRMED

craigmcd
I had the same issue. It seems to be related to what /usr/bin/getent returns for the group name so that you end up trying to add to the group "root" rather than "Administrators". I had to hack /usr/share/csih/cygwin-service-installation-helper.sh in a couple of places to finally make it work for me:

 
$ diff -c cygwin-service-installation-helper.sh.orig cygwin-service-installation-helper.sh
*** cygwin-service-installation-helper.sh.orig	2014-12-27 19:33:51.174250000 -0500
--- cygwin-service-installation-helper.sh	2014-12-27 23:26:51.893000000 -0500
***************
*** 2966,2973 ****
      if [ "$username_in_sam" = "yes" ]
      then
        # always try to set group membership and privileges
!       admingroup=$(/usr/bin/getent group S-1-5-32-544)
!       admingroup="${admingroup%%:*}"
        if [ -z "${admingroup}" ]
        then
          csih_warning "Cannot obtain the Administrators group name from 'mkgroup -l'."
--- 2966,2974 ----
      if [ "$username_in_sam" = "yes" ]
      then
        # always try to set group membership and privileges
!       admingroup=$(/usr/bin/getent -w group S-1-5-32-544)
!       admingroup="${admingroup#*:*:*\\}"
!       admingroup="${admingroup%:*}"
        if [ -z "${admingroup}" ]
        then
          csih_warning "Cannot obtain the Administrators group name from 'mkgroup -l'."
***************
*** 3263,3268 ****
--- 3264,3271 ----
    # is not yet installed, so compute the "expected" account under which
    # privileged services should run.

+   mkpasswd -l > /etc/passwd
+
    # use the following procedure if a privileged account is required:
    if ( csih_is_nt2003 || [ "x$csih_FORCE_PRIVILEGED_USER" = "xyes" ] )
    then
Reply | Threaded
Open this post in threaded view
|

RE: SSHd configuration problems (System error 1376) - CONFIRMED

craigmcd
Forgot to add that you need to do this after making those changes:

Clean up the mess ssh-host-config previously created:

cygrunsrv --stop sshd
cygrunsrv --remove sshd
net user sshd /delete
net user cyg_server /delete
edit /etc/passwd and /etc/group to remove cyg_server and sshd
rm -rf /etc/ssh*
sc delete sshd

...and rerun ssh-host-config:
ssh-host-config -y
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Bruce Halco-2
In reply to this post by craigmcd
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

craigmcd
cd /usr/share/csih

Edit the cygwin-service-installation-helper.sh and change these two lines starting at line 2969:

admingroup=$(/usr/bin/getent group S-1-5-32-544)
admingroup="${admingroup%%:*}"
<raw>

to be:

<raw>
admingroup=$(/usr/bin/getent -w group S-1-5-32-544)
admingroup="${admingroup#*:*:*\\}"
admingroup="${admingroup%:*}"

The use of the "-w" argument in getent and parsing the modified output fixed the "root" vs "Administrators" issue. There was still one more issue because the new users were not in the /etc/passwd file as expected in a later part of the script, so I had to add the following at line 3264:

mkpasswd -l > /etc/passwd

After making those changes, clean up the previous changes made by ssh-host-config as described in the earlier message, then rerun ssh-host-config.
Reply | Threaded
Open this post in threaded view
|

RE: SSHd configuration problems (System error 1376) - CONFIRMED

craigmcd
In reply to this post by craigmcd
Bruce said he could not see my edits. I'm posting from nabble and used the raw tags, so maybe that did not go through. Here they are again:

$ diff -c cygwin-service-installation-helper.sh.orig cygwin-service-installation-helper.sh
*** cygwin-service-installation-helper.sh.orig 2014-12-27 19:33:51.174250000 -0500
--- cygwin-service-installation-helper.sh 2014-12-27 23:26:51.893000000 -0500
***************
*** 2966,2973 ****
      if [ "$username_in_sam" = "yes" ]
      then
        # always try to set group membership and privileges
!       admingroup=$(/usr/bin/getent group S-1-5-32-544)
!       admingroup="${admingroup%%:*}"
        if [ -z "${admingroup}" ]
        then
          csih_warning "Cannot obtain the Administrators group name from 'mkgroup -l'."
--- 2966,2974 ----
      if [ "$username_in_sam" = "yes" ]
      then
        # always try to set group membership and privileges
!       admingroup=$(/usr/bin/getent -w group S-1-5-32-544)
!       admingroup="${admingroup#*:*:*\\}"
!       admingroup="${admingroup%:*}"
        if [ -z "${admingroup}" ]
        then
          csih_warning "Cannot obtain the Administrators group name from 'mkgroup -l'."
***************
*** 3263,3268 ****
--- 3264,3271 ----
    # is not yet installed, so compute the "expected" account under which
    # privileged services should run.

+   mkpasswd -l > /etc/passwd
+
    # use the following procedure if a privileged account is required:
    if ( csih_is_nt2003 || [ "x$csih_FORCE_PRIVILEGED_USER" = "xyes" ] )
    then
Reply | Threaded
Open this post in threaded view
|

Re: SSHd configuration problems (System error 1376) - CONFIRMED

Bruce Halco-2
CONTENTS DELETED
The author has deleted this message.