public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sshd: fatal: seteuid XXX : No such device or address
@ 2019-03-14 11:39 renaud.rolles
  2019-03-14 12:10 ` Corinna Vinschen
  2019-03-14 15:53 ` Houder
  0 siblings, 2 replies; 20+ messages in thread
From: renaud.rolles @ 2019-03-14 11:39 UTC (permalink / raw)
  To: cygwin

Hello the list, 

Thanks for all the work and effort put into this.
Since two days i cannot login anymore (password less) with ssh into my
server

Server is : 
Microsoft Windows Server 2012 R2 Essentials / 6.3.9600 N/A version 9600

Cygwin was not up to date, but I have since updated it
CYGWIN_NT-6.3 [MACHINE NAME] 3.0.3(0.338/5/3) 2019-03-09 19:12 x86_64 Cygwin

I can login via password, it work and lets me in.
But if i tried with my keys, I get in the event viewer :
sshd: PID 3777: fatal: seteuid 1049076: No such device or address

I tried googling around, reinstalled multiple times sshd, the user and the
service with no luck so far.
I was working for several years now.

For now I have no clue, so i'm asking what did I do wrong ?

Renaud ROLLES 


Below the output of the ssh-host-config, with start and try
administrator@[MACHINE NAME] ~
$ ssh-host-config

*** Info: Generating missing SSH host keys
*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file

*** Info: StrictModes is set to 'yes' by default.
*** Info: This is the recommended setting, but it requires that the POSIX
*** Info: permissions of the user's home directory, the user's .ssh
*** Info: directory, and the user's ssh key files are tight so that
*** Info: only the user has write permissions.
*** Info: On the other hand, StrictModes don't work well with default
*** Info: Windows permissions of a home directory mounted with the
*** Info: 'noacl' option, and they don't work at all if the home
*** Info: directory is on a FAT or FAT32 partition.
*** Query: Should StrictModes be used? (yes/no) yes
*** Info: Updating /etc/sshd_config file

*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [] ntsec
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires.  You need to have or to create a privileged
*** Info: account.  This script will help you do so.

*** Info: It's not possible to use the LocalSystem account for services
*** Info: that can change the user id without an explicit password
*** Info: (such as passwordless logins [e.g. public key authentication]
*** Info: via sshd) when having to create the user token from scratch.
*** Info: For more information on this requirement, see
*** Info: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1

*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless such an account
*** Info: already exists). This account is then used to run these special
*** Info: servers.

*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.

*** Info: No privileged account could be found.

*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account '[MACHINE NAME]\cyg_server'
(Cygwin name: '[MACHINE NAME]+cyg_server')? (yes/no) yes
*** Info: Please enter a password for new user [MACHINE NAME]+cyg_server.
Please be sure
*** Info: that this password matches the password rules given on your
system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:

*** Info: User '[MACHINE NAME]+cyg_server' has been created with password
'UberSuperPassword1324'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the '[MACHINE NAME]+cyg_server' account.


*** Info: The sshd service has been installed under the '[MACHINE
NAME]+cyg_server'
*** Info: account.  To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'.  Otherwise, it will start automatically
*** Info: after the next reboot.

*** Info: Host configuration finished. Have fun!

administrator@[MACHINE NAME] ~
$ net start sshd
Le service CYGWIN sshd d-marre.
Le service CYGWIN sshd a d-marr-.


administrator@[MACHINE NAME] ~
$ ssh administrator@[MACHINE NAME]
Connection closed by fe80::8c27:9bb9:70e3:1a0c%12 port 22


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 11:39 sshd: fatal: seteuid XXX : No such device or address renaud.rolles
@ 2019-03-14 12:10 ` Corinna Vinschen
  2019-03-14 13:26   ` renaud.rolles
  2019-07-10 16:10   ` schleprock
  2019-03-14 15:53 ` Houder
  1 sibling, 2 replies; 20+ messages in thread
From: Corinna Vinschen @ 2019-03-14 12:10 UTC (permalink / raw)
  To: renaud.rolles; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 1812 bytes --]

On Mar 14 12:39, renaud.rolles@giraudbtp.com wrote:
> Hello the list, 
> 
> Thanks for all the work and effort put into this.
> Since two days i cannot login anymore (password less) with ssh into my
> server
> 
> Server is : 
> Microsoft Windows Server 2012 R2 Essentials / 6.3.9600 N/A version 9600
> 
> Cygwin was not up to date, but I have since updated it
> CYGWIN_NT-6.3 [MACHINE NAME] 3.0.3(0.338/5/3) 2019-03-09 19:12 x86_64 Cygwin
> 
> I can login via password, it work and lets me in.
> But if i tried with my keys, I get in the event viewer :
> sshd: PID 3777: fatal: seteuid 1049076: No such device or address
> 
> I tried googling around, reinstalled multiple times sshd, the user and the
> service with no luck so far.
> I was working for several years now.
> 
> For now I have no clue, so i'm asking what did I do wrong ?

You should try two things:

- Make sure to login with the Administrator account case-sensitive.
  If your account is called "Administrator", then use an uppercase
  'A' when logging in.

  This case-sensitivity issue is a temporary workaround for a
  potential security problem in OpenSSH.  This will be rectified
  with OpenSSH 8.0 which allows to login case-insentive again.

- If that doesn't help, switch the user running the sshd service from
  "cyg_server" to SYSTEM (the services GUI calls it "LocalSystem")

  Cygwin switched the logon method and this method doesn't run
  under the "cyg_server" account sometimes.  However, switching
  back to "LocalSystem" instead of having to create a special
  "cyg_server" service account is one of the advantages of the
  new logon method.  For details, see

  https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1


HTH,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 12:10 ` Corinna Vinschen
@ 2019-03-14 13:26   ` renaud.rolles
  2019-03-14 13:53     ` Corinna Vinschen
  2019-03-14 14:20     ` Andrey Repin
  2019-07-10 16:10   ` schleprock
  1 sibling, 2 replies; 20+ messages in thread
From: renaud.rolles @ 2019-03-14 13:26 UTC (permalink / raw)
  To: cygwin

> 
> On Mar 14 12:39, renaud.rolles@giraudbtp.com wrote:
> > I can login via password, it work and lets me in.
> > But if i tried with my keys, I get in the event viewer :
> > sshd: PID 3777: fatal: seteuid 1049076: No such device or address
> 
> - Make sure to login with the Administrator account case-sensitive.
>   If your account is called "Administrator", then use an uppercase
>   'A' when logging in.
> 
>   This case-sensitivity issue is a temporary workaround for a
>   potential security problem in OpenSSH.  This will be rectified
>   with OpenSSH 8.0 which allows to login case-insentive again.

With Uppercase i do have a login prompt, but (with the good password), I cant login (remotly or localy).
I also have Information event :
sshd: PID 3788: Login name Administrator does not match stored username administrator
sshd: PID 3788: Invalid user Administrator from 10.0.0.8 port 60876
then three :
sshd: PID 3788: Failed password for invalid user Administrator from 10.0.0.8 port 60876 ssh2

> 
> - If that doesn't help, switch the user running the sshd service from
>   "cyg_server" to SYSTEM (the services GUI calls it "LocalSystem")
> 

This worked, like a charm, thank you 😊

>   Cygwin switched the logon method and this method doesn't run
>   under the "cyg_server" account sometimes.  However, switching
>   back to "LocalSystem" instead of having to create a special
>   "cyg_server" service account is one of the advantages of the
>   new logon method.  For details, see
> 
>   https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
> 
I didn't fully understand it all to be honest, but, is there another drawback to have the localsystem running the deamon instead of the cyg_server user, other than having the administrator possibly knowing the password ?
I only use (and by only, again, thank you for that, saved me lot of time), to make rsync over ssh on windows hosts.
> 
> Corinna
> 
Thanks Renaud


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 13:26   ` renaud.rolles
@ 2019-03-14 13:53     ` Corinna Vinschen
  2019-03-14 14:03       ` renaud.rolles
  2019-03-14 14:20     ` Andrey Repin
  1 sibling, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2019-03-14 13:53 UTC (permalink / raw)
  To: renaud.rolles; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 2369 bytes --]

On Mar 14 14:26, renaud.rolles@giraudbtp.com wrote:
> > 
> > On Mar 14 12:39, renaud.rolles@giraudbtp.com wrote:
> > > I can login via password, it work and lets me in.
> > > But if i tried with my keys, I get in the event viewer :
> > > sshd: PID 3777: fatal: seteuid 1049076: No such device or address
> > 
> > - Make sure to login with the Administrator account case-sensitive.
> >   If your account is called "Administrator", then use an uppercase
> >   'A' when logging in.
> > 
> >   This case-sensitivity issue is a temporary workaround for a
> >   potential security problem in OpenSSH.  This will be rectified
> >   with OpenSSH 8.0 which allows to login case-insentive again.
> 
> With Uppercase i do have a login prompt, but (with the good password), I cant login (remotly or localy).
> I also have Information event :
> sshd: PID 3788: Login name Administrator does not match stored username administrator

As I said above, *if* your account is called Administrator...

> sshd: PID 3788: Invalid user Administrator from 10.0.0.8 port 60876
> then three :
> sshd: PID 3788: Failed password for invalid user Administrator from 10.0.0.8 port 60876 ssh2
> 
> > 
> > - If that doesn't help, switch the user running the sshd service from
> >   "cyg_server" to SYSTEM (the services GUI calls it "LocalSystem")
> > 
> 
> This worked, like a charm, thank you 😊
> 
> >   Cygwin switched the logon method and this method doesn't run
> >   under the "cyg_server" account sometimes.  However, switching
> >   back to "LocalSystem" instead of having to create a special
> >   "cyg_server" service account is one of the advantages of the
> >   new logon method.  For details, see
> > 
> >   https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
> > 
> I didn't fully understand it all to be honest, but, is there another
> drawback to have the localsystem running the deamon instead of the
> cyg_server user, other than having the administrator possibly knowing
> the password ?

The cyg_server account has been introduced many years ago as a
workaround for a change in the LocalSystem permissions in 
Windows 2003 and later.  The new S4ULogon method makes the cyg_server
account obsolete because the reduced permissions of LocalSystem
are sufficient now.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 13:53     ` Corinna Vinschen
@ 2019-03-14 14:03       ` renaud.rolles
  0 siblings, 0 replies; 20+ messages in thread
From: renaud.rolles @ 2019-03-14 14:03 UTC (permalink / raw)
  To: cygwin

> Objet : Re: sshd: fatal: seteuid XXX : No such device or address
> 
> On Mar 14 14:26, renaud.rolles@giraudbtp.com wrote:
> > >
> > > On Mar 14 12:39, renaud.rolles@giraudbtp.com wrote:
> > > > I can login via password, it work and lets me in.
> > > > But if i tried with my keys, I get in the event viewer :
> > > > sshd: PID 3777: fatal: seteuid 1049076: No such device or address
> > >
> > > - Make sure to login with the Administrator account case-sensitive.
> > >   If your account is called "Administrator", then use an uppercase
> > >   'A' when logging in.
> > >
> >
> > With Uppercase i do have a login prompt, but (with the good password), I
> cant login (remotly or localy).
> > I also have Information event :
> > sshd: PID 3788: Login name Administrator does not match stored
> > username administrator
> 
> As I said above, *if* your account is called Administrator...
> 

It is for the windows login, and used to be for cygwin to, it changed when i updated cygwin.
Login, localy and remotly dont work without capitalization, but the prompt is lowercase from local terminal, see below :

administrator@[MACHINE NAME] ~
$ ssh administrator@[MACHINE NAME]
administrator@[MACHINE NAME]'s password:
Ctrl+c

administrator@[MACHINE NAME] ~
$ ssh Administrator@[MACHINE NAME]
Last login: Thu Mar 14 14:58:00 2019 from 10.0.0.8

Administrator@[MACHINE NAME] ~
$
> >
> > >
> > > - If that doesn't help, switch the user running the sshd service from
> > >   "cyg_server" to SYSTEM (the services GUI calls it "LocalSystem")
> > >
> >
> > This worked, like a charm, thank you 😊
> >
> 
> The cyg_server account has been introduced many years ago as a
> workaround for a change in the LocalSystem permissions in Windows 2003
> and later.  The new S4ULogon method makes the cyg_server account
> obsolete because the reduced permissions of LocalSystem are sufficient
> now.
> 
Ok, thank you, i installed it few years ago, so outdated knowledge.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 13:26   ` renaud.rolles
  2019-03-14 13:53     ` Corinna Vinschen
@ 2019-03-14 14:20     ` Andrey Repin
  2019-03-14 14:24       ` David Dombrowsky
  2019-03-14 14:38       ` renaud.rolles
  1 sibling, 2 replies; 20+ messages in thread
From: Andrey Repin @ 2019-03-14 14:20 UTC (permalink / raw)
  To: renaud.rolles, cygwin

Greetings, renaud.rolles@giraudbtp.com!

>> > I can login via password, it work and lets me in.
>> > But if i tried with my keys, I get in the event viewer :
>> > sshd: PID 3777: fatal: seteuid 1049076: No such device or address
>> 
>> - Make sure to login with the Administrator account case-sensitive.
>>   If your account is called "Administrator", then use an uppercase
>>   'A' when logging in.
>> 
>>   This case-sensitivity issue is a temporary workaround for a
>>   potential security problem in OpenSSH.  This will be rectified
>>   with OpenSSH 8.0 which allows to login case-insentive again.

> With Uppercase i do have a login prompt, but (with the good password), I cant login (remotly or localy).
> I also have Information event :
> sshd: PID 3788: Login name Administrator does not match stored username administrator
> sshd: PID 3788: Invalid user Administrator from 10.0.0.8 port 60876
> then three :
> sshd: PID 3788: Failed password for invalid user Administrator from 10.0.0.8 port 60876 ssh2

Please remove /etc/passwd and /etc/group files. They are no longer necessary,
unless you have some very special needs, and even then, they only needed for
that one or two accounts you need special treatment for.

>> 
>> - If that doesn't help, switch the user running the sshd service from
>>   "cyg_server" to SYSTEM (the services GUI calls it "LocalSystem")
>> 

> This worked, like a charm, thank you 😊

>>   Cygwin switched the logon method and this method doesn't run
>>   under the "cyg_server" account sometimes.  However, switching
>>   back to "LocalSystem" instead of having to create a special
>>   "cyg_server" service account is one of the advantages of the
>>   new logon method.  For details, see
>> 
>>   https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
>> 
> I didn't fully understand it all to be honest, but, is there another
> drawback to have the localsystem running the deamon instead of the
> cyg_server user, other than having the administrator possibly knowing the
> password ?
> I only use (and by only, again, thank you for that, saved me lot of time),
> to make rsync over ssh on windows hosts.

The main security concern is, why your Administrator user:
1. have password, and
2. is not disabled?


-- 
With best regards,
Andrey Repin
Thursday, March 14, 2019 16:39:04

Sorry for my terrible english...
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 14:20     ` Andrey Repin
@ 2019-03-14 14:24       ` David Dombrowsky
  2019-03-14 14:27         ` Corinna Vinschen
  2019-03-14 14:50         ` Andrey Repin
  2019-03-14 14:38       ` renaud.rolles
  1 sibling, 2 replies; 20+ messages in thread
From: David Dombrowsky @ 2019-03-14 14:24 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 597 bytes --]

On 3/14/19 10:11 AM, Andrey Repin wrote:
> Please remove /etc/passwd and /etc/group files. They are no longer necessary,
> unless you have some very special needs, and even then, they only needed for
> that one or two accounts you need special treatment for.
> 

Wait what?  What about all the standard unix programs that use those
files to determine UID and all that?  Since when can we blow away
/etc/passwd and /etc/group on a cygwin install?

-- 
David Dombrowsky, Software Engineer
davek@6thstreetradio.org | 518-374-3204
https://www.linkedin.com/in/david-dombrowsky-94334415


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 14:24       ` David Dombrowsky
@ 2019-03-14 14:27         ` Corinna Vinschen
  2019-03-14 14:50         ` Andrey Repin
  1 sibling, 0 replies; 20+ messages in thread
From: Corinna Vinschen @ 2019-03-14 14:27 UTC (permalink / raw)
  To: davek; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

On Mar 14 10:24, David Dombrowsky wrote:
> On 3/14/19 10:11 AM, Andrey Repin wrote:
> > Please remove /etc/passwd and /etc/group files. They are no longer necessary,
> > unless you have some very special needs, and even then, they only needed for
> > that one or two accounts you need special treatment for.
> > 
> 
> Wait what?  What about all the standard unix programs that use those
> files to determine UID and all that?  Since when can we blow away
> /etc/passwd and /etc/group on a cygwin install?

Since 2014.

https://cygwin.com/cygwin-ug-net/ntsec.html


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 14:20     ` Andrey Repin
  2019-03-14 14:24       ` David Dombrowsky
@ 2019-03-14 14:38       ` renaud.rolles
  2019-03-14 15:07         ` Andrey Repin
  1 sibling, 1 reply; 20+ messages in thread
From: renaud.rolles @ 2019-03-14 14:38 UTC (permalink / raw)
  To: cygwin

> Please remove /etc/passwd and /etc/group files. They are no longer
> necessary, unless you have some very special needs, and even then, they
> only needed for that one or two accounts you need special treatment for.

They dont exists.

> The main security concern is, why your Administrator user:
> 1. have password, and
> 2. is not disabled?

Why would i disable Administrator, it's the only local account, the server isn't in any domain and without password it doesn't seem secure at all.
 



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 14:24       ` David Dombrowsky
  2019-03-14 14:27         ` Corinna Vinschen
@ 2019-03-14 14:50         ` Andrey Repin
  1 sibling, 0 replies; 20+ messages in thread
From: Andrey Repin @ 2019-03-14 14:50 UTC (permalink / raw)
  To: David Dombrowsky, cygwin

Greetings, David Dombrowsky!

> On 3/14/19 10:11 AM, Andrey Repin wrote:
>> Please remove /etc/passwd and /etc/group files. They are no longer necessary,
>> unless you have some very special needs, and even then, they only needed for
>> that one or two accounts you need special treatment for.
>> 

> Wait what?  What about all the standard unix programs that use those
> files to determine UID and all that?

No program should use these files to determine UID and all that.
If any of them does, it is either 30+ years old or not a standard program and
whoever wrote it should be beaten to death.

> Since when can we blow away
> /etc/passwd and /etc/group on a cygwin install?

Since about 3 to 5 years.


-- 
With best regards,
Andrey Repin
Thursday, March 14, 2019 17:47:17

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 14:38       ` renaud.rolles
@ 2019-03-14 15:07         ` Andrey Repin
  2019-03-14 15:29           ` renaud.rolles
  0 siblings, 1 reply; 20+ messages in thread
From: Andrey Repin @ 2019-03-14 15:07 UTC (permalink / raw)
  To: renaud.rolles, cygwin

Greetings, renaud.rolles@giraudbtp.com!

>> Please remove /etc/passwd and /etc/group files. They are no longer
>> necessary, unless you have some very special needs, and even then, they
>> only needed for that one or two accounts you need special treatment for.

> They dont exists.

Then my next guess is that you'll have to reestablish your trust with
`passwd -R`. There's not many places where and what can be "saved" :)

>> The main security concern is, why your Administrator user:
>> 1. have password, and
>> 2. is not disabled?

> Why would i disable Administrator, it's the only local account, the server
> isn't in any domain and without password it doesn't seem secure at all.

Create a different local account, with necessary password and permissions,
then reset password on local Administrator account and disable it.

As for why, Administrator is the only local account with super-user
permissions that is guaranteed to exist. Windows uses it in case something
gone REALLY wrong, such as AD database recovery procedures.

It is easy enough to enable a locked account with offline tools, if your system
gone into such disrepair, that you can no longer even boot it, and need a
LiveCD to login to local SAM environment.
But recovering a lost Administrator password is a nontrivial endeavor, and
chances to brind system into a working state without complete reinstall are
diminishing rather quick.


-- 
With best regards,
Andrey Repin
Thursday, March 14, 2019 17:49:16

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 15:07         ` Andrey Repin
@ 2019-03-14 15:29           ` renaud.rolles
  0 siblings, 0 replies; 20+ messages in thread
From: renaud.rolles @ 2019-03-14 15:29 UTC (permalink / raw)
  To: cygwin

> As for why, Administrator is the only local account with super-user
> permissions that is guaranteed to exist. Windows uses it in case something
> gone REALLY wrong, such as AD database recovery procedures.
> 
> It is easy enough to enable a locked account with offline tools, if your
system
> gone into such disrepair, that you can no longer even boot it, and need a
> LiveCD to login to local SAM environment.
> But recovering a lost Administrator password is a nontrivial endeavor, and
> chances to brind system into a working state without complete reinstall
are
> diminishing rather quick.

Ok, I will do it, I didn't think of that, thanks for sharing.

Thank you the list, you have been really helpfull.

Renaud


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 11:39 sshd: fatal: seteuid XXX : No such device or address renaud.rolles
  2019-03-14 12:10 ` Corinna Vinschen
@ 2019-03-14 15:53 ` Houder
  2019-03-14 17:29   ` Corinna Vinschen
  1 sibling, 1 reply; 20+ messages in thread
From: Houder @ 2019-03-14 15:53 UTC (permalink / raw)
  To: cygwin

On Thu, 14 Mar 2019 12:39:30, XXXXX wrote:
> Hello the list, 
> 
> Thanks for all the work and effort put into this.
> Since two days i cannot login anymore (password less) with ssh into my
> server
> 
> Server is : 
> Microsoft Windows Server 2012 R2 Essentials / 6.3.9600 N/A version 9600
> 
> Cygwin was not up to date, but I have since updated it
> CYGWIN_NT-6.3 [MACHINE NAME] 3.0.3(0.338/5/3) 2019-03-09 19:12 x86_64 Cygwin
> 
> I can login via password, it work and lets me in.
> But if i tried with my keys, I get in the event viewer :
> sshd: PID 3777: fatal: seteuid 1049076: No such device or address

Corinna,

As far as I know, seteuid() can either return EINVAL or EPERM in case of
an error.

EPERM (=  1) "Operation not permitted"
EINVAL(= 22) "Invalid argument"

"No such device or address" appears to correspond to ENXIO (=  6). Is it
sshd, or is it Cygwin, that is confused here?

Henri


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 15:53 ` Houder
@ 2019-03-14 17:29   ` Corinna Vinschen
  2019-03-15 13:06     ` Houder
  0 siblings, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2019-03-14 17:29 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

On Mar 14 16:53, Houder wrote:
> On Thu, 14 Mar 2019 12:39:30, XXXXX wrote:
> > Hello the list, 
> > 
> > Thanks for all the work and effort put into this.
> > Since two days i cannot login anymore (password less) with ssh into my
> > server
> > 
> > Server is : 
> > Microsoft Windows Server 2012 R2 Essentials / 6.3.9600 N/A version 9600
> > 
> > Cygwin was not up to date, but I have since updated it
> > CYGWIN_NT-6.3 [MACHINE NAME] 3.0.3(0.338/5/3) 2019-03-09 19:12 x86_64 Cygwin
> > 
> > I can login via password, it work and lets me in.
> > But if i tried with my keys, I get in the event viewer :
> > sshd: PID 3777: fatal: seteuid 1049076: No such device or address
> 
> Corinna,
> 
> As far as I know, seteuid() can either return EINVAL or EPERM in case of
> an error.
> 
> EPERM (=  1) "Operation not permitted"
> EINVAL(= 22) "Invalid argument"
> 
> "No such device or address" appears to correspond to ENXIO (=  6). Is it
> sshd, or is it Cygwin, that is confused here?

No confusion as such.  The underlying Windows function returns a NT
status code, which is converted to a Win32 error code by a Windows
function, and that Win32 error code is converted to a POSIX errno by
Cygwin.  There are much more NT status codes than Win32 error codes, and
there are much more Win32 error codses than POSIX errno values, so the
mapping is inevitably unsatisfying.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 17:29   ` Corinna Vinschen
@ 2019-03-15 13:06     ` Houder
  2019-03-15 13:42       ` Corinna Vinschen
  0 siblings, 1 reply; 20+ messages in thread
From: Houder @ 2019-03-15 13:06 UTC (permalink / raw)
  To: cygwin

On Thu, 14 Mar 2019 18:29:18, Corinna Vinschen  wrote:

> On Mar 14 16:53, Houder wrote:

> > On Thu, 14 Mar 2019 12:39:30, XXXXX wrote:
> > > Hello the list
[snip]
> > > sshd: PID 3777: fatal: seteuid 1049076: No such device or address

> > Corinna,
> >
> > As far as I know, seteuid() can either return EINVAL or EPERM in case of
> > an error.
> >
> > EPERM (=3D  1) "Operation not permitted"
> > EINVAL(=3D 22) "Invalid argument"
> >
> > "No such device or address" appears to correspond to ENXIO (=3D  6). Is it
> > sshd, or is it Cygwin, that is confused here?
> 
> No confusion as such.  The underlying Windows function returns a NT
> status code, which is converted to a Win32 error code by a Windows
> function, and that Win32 error code is converted to a POSIX errno by
> Cygwin.  There are much more NT status codes than Win32 error codes, and
> there are much more Win32 error codses than POSIX errno values, so the
> mapping is inevitably unsatisfying.

.. yes, I am aware of the situation (winsup/cygwin/errno.cc) ...

However, in the end this kind of error messages is of NOT much use in order
to ascertain what is going on (i.e. what is causing the problem).

One is forced to create the exact same environment (system) as the person
who is complaining, fire up the debugger (like sticking a thermometer in a
patient's rear end) in order to find out where the code failed ...

Meaning, within the context of the recent sshd problems, possibly only you
know where the error ERROR_FILE_INVALID (resulting in the error message "No
such device or address") was generated ... (and by which Windows function).

Oh well, this cannot be helped ...

Thank you.

Regards,
Henri


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-15 13:06     ` Houder
@ 2019-03-15 13:42       ` Corinna Vinschen
  2019-03-15 19:39         ` Houder
  0 siblings, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2019-03-15 13:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]

On Mar 15 14:06, Houder wrote:
> On Thu, 14 Mar 2019 18:29:18, Corinna Vinschen  wrote:
> 
> > On Mar 14 16:53, Houder wrote:
> 
> > > On Thu, 14 Mar 2019 12:39:30, XXXXX wrote:
> > > > Hello the list
> [snip]
> > > > sshd: PID 3777: fatal: seteuid 1049076: No such device or address
> 
> > > Corinna,
> > >
> > > As far as I know, seteuid() can either return EINVAL or EPERM in case of
> > > an error.
> > >
> > > EPERM (=3D  1) "Operation not permitted"
> > > EINVAL(=3D 22) "Invalid argument"
> > >
> > > "No such device or address" appears to correspond to ENXIO (=3D  6). Is it
> > > sshd, or is it Cygwin, that is confused here?
> > 
> > No confusion as such.  The underlying Windows function returns a NT
> > status code, which is converted to a Win32 error code by a Windows
> > function, and that Win32 error code is converted to a POSIX errno by
> > Cygwin.  There are much more NT status codes than Win32 error codes, and
> > there are much more Win32 error codses than POSIX errno values, so the
> > mapping is inevitably unsatisfying.
> 
> .. yes, I am aware of the situation (winsup/cygwin/errno.cc) ...
> 
> However, in the end this kind of error messages is of NOT much use in order
> to ascertain what is going on (i.e. what is causing the problem).
> 
> One is forced to create the exact same environment (system) as the person
> who is complaining, fire up the debugger (like sticking a thermometer in a
> patient's rear end) in order to find out where the code failed ...
> 
> Meaning, within the context of the recent sshd problems, possibly only you
> know where the error ERROR_FILE_INVALID (resulting in the error message "No
> such device or address") was generated ... (and by which Windows function).

The only interface an application has is by checking the POSIX
errno value.  This is what Cygwin is about :)

If you need more details what's going on under the hood, you have
to use strace.

> Oh well, this cannot be helped ...

Well, there *is* a solution by using strace.  And hey, we now know what
ENXIO returned from seteuid means, don't we?  It's not all bad :)


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-15 13:42       ` Corinna Vinschen
@ 2019-03-15 19:39         ` Houder
  2019-03-15 20:41           ` Corinna Vinschen
  0 siblings, 1 reply; 20+ messages in thread
From: Houder @ 2019-03-15 19:39 UTC (permalink / raw)
  To: cygwin

On Fri, 15 Mar 2019 14:42:47, Corinna Vinschen  wrote:

> On Mar 15 14:06, Houder wrote:

> > One is forced to create the exact same environment (system) as the
> > person who is complaining, fire up the debugger (like sticking
> > a thermometer in a patient's rear end) in order to find out where
> > the code failed ...
> >
> > Meaning, within the context of the recent sshd problems, possibly only
                                                                      ^^^^
> > you know where the error ERROR_FILE_INVALID (resulting in the error
    ^^^

strace, yes. But only if one has the exact same "network" at one's disposal
as the one where the problem occurred (like you have at your place; while I
only have one simple computer) ... That is decisive.

> > message "No such device or address") was generated ... (and by which
> > Windows function).
> 
> The only interface an application has is by checking the POSIX
> errno value.  This is what Cygwin is about :)
> 
> If you need more details what's going on under the hood, you have
> to use strace.
> 
> > Oh well, this cannot be helped ...
> 
> Well, there *is* a solution by using strace.  And hey, we now know what
> ENXIO returned from seteuid means, don't we?  It's not all bad :)

You do! I do not :-) (as I do not have the machinery at my disposal that
is required to provoke this error).

A simple STC to emphasize my statement (i.e. a problem that I can strace
on my computer).

int
main()
{
    errno = 0;
    if (seteuid( (uid_t)1004) != 0) { // 1004, not being me :-)
        printf("seteuid: errno = %d, errstr = %s\n", errno, strerror(errno) );
        // seteuid: errno = 13, errstr = Permission denied => EACCES
        // ... while only EPERM en EINVAL are documented ...
    } else printf("1004, OK\n");
}

64-@@ ./seteuid
seteuid: errno = 13, errstr = Permission denied ... huh?

On Linux this simple "Simple Test Case" will result in:
seteuid: errno = 1, errstr = Operation not permitted ... Got it!

Fortunately, I have now have the strace output at my disposal:

... studying the strace output and the source code, I am now able to
tell what is going on ... see below:

seteuid (syscalls.cc)

.lsaprivkeyauth (sec_auth.cc) <==== fails; as result NULL (token)
                                     is returned by lsaprivkeyauth ...
...lsa_open_policy (sec_auth.cc) <==== fails; as result NULL (lsa)
                                        is returned by lsa_open_policy ...
    # errno, set by lsa_open_policy, is ignored
  # seteuid() chooses NOT to bail out, but
  # to attempt "Service For User Logon" (s4u) ...

.s4uauth (sec_auth.cc) <==== fails (because LsaRegisterLogonProcess
                              fails), returning the status (0xC0000041)
                              to seteuid()
  # /usr/include/w32api/ntstatus.h:
  # defines STATUS_PORT_CONNECTION_REFUSED ((NTSTATUS)0xC0000041)
  # now seteuid chooses to bail out (i.e. setuid() fails)
Q: errno?
s4uauth calls __seterrno_from_nt_status (0xC0000041), which in turn
 calls RtlNtStatusToDosError(0xC0000041), which in turn
 calls geterrno_from_win_error(5,...):
 0xC0000041 is mapped to 5, which in turn is mapped to 13 (EACCES).

Henri


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-15 19:39         ` Houder
@ 2019-03-15 20:41           ` Corinna Vinschen
  2019-03-16  9:21             ` Houder
  0 siblings, 1 reply; 20+ messages in thread
From: Corinna Vinschen @ 2019-03-15 20:41 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

On Mar 15 20:39, Houder wrote:
> On Fri, 15 Mar 2019 14:42:47, Corinna Vinschen  wrote:
> 
> > On Mar 15 14:06, Houder wrote:
> 
> > > One is forced to create the exact same environment (system) as the
> > > person who is complaining, fire up the debugger (like sticking
> > > a thermometer in a patient's rear end) in order to find out where
> > > the code failed ...
> > >
> > > Meaning, within the context of the recent sshd problems, possibly only
>                                                                       ^^^^
> > > you know where the error ERROR_FILE_INVALID (resulting in the error
>     ^^^
> 
> strace, yes. But only if one has the exact same "network" at one's disposal
> as the one where the problem occurred (like you have at your place; while I
> only have one simple computer) ... That is decisive.
> 
> > > message "No such device or address") was generated ... (and by which
> > > Windows function).
> > 
> > The only interface an application has is by checking the POSIX
> > errno value.  This is what Cygwin is about :)
> > 
> > If you need more details what's going on under the hood, you have
> > to use strace.
> > 
> > > Oh well, this cannot be helped ...
> > 
> > Well, there *is* a solution by using strace.  And hey, we now know what
> > ENXIO returned from seteuid means, don't we?  It's not all bad :)
> 
> You do! I do not :-) (as I do not have the machinery at my disposal that
> is required to provoke this error).

If I'm not mistaken the error occurs for local machine accounts, not for
domain accounts.  But either way, this problem can only be straced on
machines which can reproduce the problem and that's usually the machine
of the OP in the first place.

I'm not sure what you're asking for, what do you want to change in
Cygwin?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-15 20:41           ` Corinna Vinschen
@ 2019-03-16  9:21             ` Houder
  0 siblings, 0 replies; 20+ messages in thread
From: Houder @ 2019-03-16  9:21 UTC (permalink / raw)
  To: cygwin

On Fri, 15 Mar 2019 21:41:22, Corinna Vinschen  wrote:

> On Mar 15 20:39, Houder wrote:

> > On Fri, 15 Mar 2019 14:42:47, Corinna Vinschen  wrote:
[snip]

> > > Well, there *is* a solution by using strace.  And hey, we now know what
> > > ENXIO returned from seteuid means, don't we?  It's not all bad :)
> >
> > You do! I do not :-) (as I do not have the machinery at my disposal that
> > is required to provoke this error).
> 
> If I'm not mistaken the error occurs for local machine accounts, not for
> domain accounts.  But either way, this problem can only be straced on
> machines which can reproduce the problem and that's usually the machine
> of the OP in the first place.

OP's machine (or equivalent)? Basically, that is what I stated above (i.e.
attempting to state) ...

Error occurs for local machine accounts? Yes, but not at my place! (I did
not see the error (ENXIO) when the sshd problem came up when cygwin 3 was
introduced -- because I "loop back" when using ssh).

> I'm not sure what you're asking for, what do you want to change in
> Cygwin?

To answer the 2nd part of your question: nothing! (even if I was capable
of changing Cygwin).

I can appreciate(?) the complexity of mapping "Linux" to Windows. Simple
enough (?) in case of something like reading/writing a file, because that
concept (general enough to be) is present in both Windows and "Linux".

Totally different in case of seteuid() and companions ...

(Could the error reporting be improved if the Linux system call would be
 a parameter when mapping Windows failure codes to "Linux" error codes?
 I believe that would be very, very troublesome)

To answer the 1st part of your question ...

.. well, I had hoped that you had seen what Windows function had caused
the "No such device or address" error message to appear ...
(and was willing to share that info :-).

I know that you were the one that introduced ERROR_FILE_INVALID and made
it map to ENXIO (in 2001 ... good gracious, almost 20 years ago).

Presumably, because of the empty file problem in av::setup(), a function
in winsup/cygwin/spawn.cc.

Error code ENXIO occurs at a very different level (lower) in Linux than
the level where seteuid() and companions live ...

That is why I was wondering? what made seteuid() in Cygwin generate this
error ...

So, basically, my interest comes down to curiosity! (and I assumed that
you had seen the error appear when the sshd problem came up).

End of thread? :-)

Henri

=====


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: sshd: fatal: seteuid XXX : No such device or address
  2019-03-14 12:10 ` Corinna Vinschen
  2019-03-14 13:26   ` renaud.rolles
@ 2019-07-10 16:10   ` schleprock
  1 sibling, 0 replies; 20+ messages in thread
From: schleprock @ 2019-07-10 16:10 UTC (permalink / raw)
  To: cygwin

so i ran into the same problem and had some difficulty in figuring out how to
apply the solution. so hopefully to save other people from the same issue. 
to set the sshd service to use the SYSTEM you open the properties sheet for
sshd service, go to the "Log On" tab and then click the radio button on the
"Local System account"

worked like a charm for me...

schleprock




--
Sent from: http://cygwin.1069669.n5.nabble.com/Cygwin-list-f3.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-07-10 16:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 11:39 sshd: fatal: seteuid XXX : No such device or address renaud.rolles
2019-03-14 12:10 ` Corinna Vinschen
2019-03-14 13:26   ` renaud.rolles
2019-03-14 13:53     ` Corinna Vinschen
2019-03-14 14:03       ` renaud.rolles
2019-03-14 14:20     ` Andrey Repin
2019-03-14 14:24       ` David Dombrowsky
2019-03-14 14:27         ` Corinna Vinschen
2019-03-14 14:50         ` Andrey Repin
2019-03-14 14:38       ` renaud.rolles
2019-03-14 15:07         ` Andrey Repin
2019-03-14 15:29           ` renaud.rolles
2019-07-10 16:10   ` schleprock
2019-03-14 15:53 ` Houder
2019-03-14 17:29   ` Corinna Vinschen
2019-03-15 13:06     ` Houder
2019-03-15 13:42       ` Corinna Vinschen
2019-03-15 19:39         ` Houder
2019-03-15 20:41           ` Corinna Vinschen
2019-03-16  9:21             ` Houder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).