Search code examples
sshcygwinhbase

Cygwin: ssh-host-config fails with 'local group does not exist'


I am trying to install Hbase on a VM under Windows 7.

I followed the instructions and everything is OK until i do the ssh-host-config.

I see the following:

>Should privilege separation be used? Yes
>new local account ‘sshd’? Yes
>Do you want to install sshd as a service? Yes
>Enter the value of CYGWIN for the daemon?[] just <enter>
>Do you want to use a different name? No
>create new privileged user account ‘cyg_server’ account? Yes
>Please enter the password: 
>Reenter: 

>User has been created
>System error 1376 has occurred
>The specified local group does not exist.
>Adding user cyg_server to local group root failed
>Please add cyg_server to local group before

Solution

  • You can check what that lame error means, with:

    $ NET HELPMSG 1376
    
    The specified local group does not exist.
    

    The problem seem to be that the script is not giving the new user account "Administrator" group membership. You can check this with: net user cyg_server from a normal windows command shell (CMD). Make sure the line reads:

    Local Group Memberships  *Administrators  *Users
    

    If it doesn't, you need to open the Windows control panel and navigate to User Accounts. There you will find a new account called "Privileged server", which is the cyg_server account. You need to change the account type of that from Standard to Administrator.

    Now restart sshd and check that it's running with:

    $ cygrunsrv.exe --query sshd
    
    Service             : sshd
    Display name        : CYGWIN sshd
    Current State       : Running
    Controls Accepted   : Stop
    Command             : /usr/sbin/sshd -D
    

    However, this is probably not the end of the story as these accounts cannot be used to login with, if they do not have a password assigned. You need to create (and add to /etc/passwd) a new account with remote login rights. And don't forget to check account password expiration...