public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mintty startup message: /sbin/nologin: No such file or directory
@ 2015-03-21  4:05 Mirko Vukovic
  2015-03-21  6:45 ` Andrey Repin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mirko Vukovic @ 2015-03-21  4:05 UTC (permalink / raw)
  To: cygwin

Hello,

after upgrading cygwin64 on my company laptop, mintty gives the following
message *when connected to the network from home*:

/sbin/nologin: No such file or directory

Pressing enter closes the window.

I can start bash from Windows' command window.  From there, I see that there
is no /sbin/nologin file, heck there is no /sbin either.

A couple of data points:
- After the upgrade, I renamed away the /etc passwd and group files.
- I was able to open mintty while connect to the network at work


I have an almost identical setup on my other windows 7 desktop (always
connected to the network) that does not exhibit this problem.

I saw some posts from 2011 about creating my own file but I am puzzled
as to why I see this on my laptop and not on my desktop.

I looked in Windows logs and saw nothing.  I saw nothing in /var/log

Thanks,

Mirko

--
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] 7+ messages in thread

* Re: mintty startup message: /sbin/nologin: No such file or directory
  2015-03-21  4:05 mintty startup message: /sbin/nologin: No such file or directory Mirko Vukovic
@ 2015-03-21  6:45 ` Andrey Repin
  2015-03-21 16:41 ` Habermann, David (D)
  2015-03-21 20:03 ` Corinna Vinschen
  2 siblings, 0 replies; 7+ messages in thread
From: Andrey Repin @ 2015-03-21  6:45 UTC (permalink / raw)
  To: Mirko Vukovic, cygwin

Greetings, Mirko Vukovic!

> after upgrading cygwin64 on my company laptop, mintty gives the following
> message *when connected to the network from home*:

Does that mean you're logged into your work domain?

> /sbin/nologin: No such file or directory

> Pressing enter closes the window.

This screams of the Cygwin schema applied to your AD at work, but incorrectly
recognized at home.

> I can start bash from Windows' command window.  From there, I see that there
> is no /sbin/nologin file, heck there is no /sbin either.

> A couple of data points:
> - After the upgrade, I renamed away the /etc passwd and group files.
> - I was able to open mintty while connect to the network at work

Did you do any changes to the /etc/nsswitch.conf ?
What running 'getent passwd' yield about your user when you are connected and
not connected to the network?

> I have an almost identical setup on my other windows 7 desktop (always
> connected to the network) that does not exhibit this problem.

> I saw some posts from 2011 about creating my own file but I am puzzled
> as to why I see this on my laptop and not on my desktop.

> I looked in Windows logs and saw nothing.  I saw nothing in /var/log


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 21.03.2015, <06:53>

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] 7+ messages in thread

* RE: mintty startup message: /sbin/nologin: No such file or directory
  2015-03-21  4:05 mintty startup message: /sbin/nologin: No such file or directory Mirko Vukovic
  2015-03-21  6:45 ` Andrey Repin
@ 2015-03-21 16:41 ` Habermann, David (D)
  2015-03-21 16:47   ` Corinna Vinschen
  2015-03-21 20:03 ` Corinna Vinschen
  2 siblings, 1 reply; 7+ messages in thread
From: Habermann, David (D) @ 2015-03-21 16:41 UTC (permalink / raw)
  To: cygwin

I observed the same error.  In my case, it was apparently caused by a too-rapid startup at boot of cygserver, which apparently could not connect to LDAP at that early stage.  If I prevented any of my Cygwin services from starting at boot, and then started them manually once I logged in, the problem was not observed.  My current solution (still perhaps not the best) is to set all of my Cygwin services to start as "Automatic (Delayed Start)" in the services control panel.  This does solve my problem, but causes about a 1-2 minute delay in the availability of sshd/httpd2 after a reboot.

NOTE: I've also set all of my other Cygwin services to be dependent on cygserver as described in the Cygwin documentation.

Dave
-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Mirko Vukovic
Sent: Friday, March 20, 2015 10:14 PM
To: cygwin@cygwin.com
Subject: mintty startup message: /sbin/nologin: No such file or directory

Hello,

after upgrading cygwin64 on my company laptop, mintty gives the following message *when connected to the network from home*:

/sbin/nologin: No such file or directory

Pressing enter closes the window.

I can start bash from Windows' command window.  From there, I see that there is no /sbin/nologin file, heck there is no /sbin either.

A couple of data points:
- After the upgrade, I renamed away the /etc passwd and group files.
- I was able to open mintty while connect to the network at work


I have an almost identical setup on my other windows 7 desktop (always connected to the network) that does not exhibit this problem.

I saw some posts from 2011 about creating my own file but I am puzzled as to why I see this on my laptop and not on my desktop.

I looked in Windows logs and saw nothing.  I saw nothing in /var/log

Thanks,

Mirko

--
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] 7+ messages in thread

* Re: mintty startup message: /sbin/nologin: No such file or directory
  2015-03-21 16:41 ` Habermann, David (D)
@ 2015-03-21 16:47   ` Corinna Vinschen
  2015-03-23  7:40     ` Habermann, David (D)
  2015-03-23 19:17     ` Linda Walsh
  0 siblings, 2 replies; 7+ messages in thread
From: Corinna Vinschen @ 2015-03-21 16:47 UTC (permalink / raw)
  To: cygwin

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

Hi David,

On Mar 21 13:50, Habermann, David (D) wrote:
> I observed the same error.  In my case, it was apparently caused by a
> too-rapid startup at boot of cygserver, which apparently could not
> connect to LDAP at that early stage.

LDAP can't have to do with that, in theory.  The whole mechanism should
give a sane result even if LDAP connections fail, because the core part
is the call to LookupAccountSid and that's the only call which has to
succeed.

I just had a quick glance into the source code and I'm seriously puzzled
how it could create /sbin/nologin.  This should only happen if your
account is not a SidTypeUser account.  But that's impossible for a user
account.

Unless, and that's the puzzeling thing here, unless LookupAccountSid
failed for your account and returned SidTypeUnknown.  This should never
happen for a user logged in to the system since in this case all the
information returned by LookupAccountSid should be cached.


I'd like to investigate more, but it would be nice if we could try
to understand what exactly happens.  How exactly looks the output
of `getent passwd <your account>' and `id' while you're getting the
/sbin/nologin shell entry?  There may be also some interesting info in
an strace, or we could run an (yet to be created) augmented Cygwin DLL
in your scenario


As for /sbin/nologin itself, I'm not sure why I did that without
providing an /sbin/nologin executable.  This is very clearly an oversight
on my part.
In theory it should be part of the util-linux package, but it isn't for
some reason.  Yaakov, any idea why?  Is it a problem to add it?

Alternatively, is anybody interest to provide just /sbin/nologin as an
extra package, perhaps?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: mintty startup message: /sbin/nologin: No such file or directory
  2015-03-21  4:05 mintty startup message: /sbin/nologin: No such file or directory Mirko Vukovic
  2015-03-21  6:45 ` Andrey Repin
  2015-03-21 16:41 ` Habermann, David (D)
@ 2015-03-21 20:03 ` Corinna Vinschen
  2 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 2015-03-21 20:03 UTC (permalink / raw)
  To: cygwin

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

On Mar 20 22:13, Mirko Vukovic wrote:
> Hello,
> 
> after upgrading cygwin64 on my company laptop, mintty gives the following
> message *when connected to the network from home*:
> 
> /sbin/nologin: No such file or directory

I replied to David's mail, but the same puzzled observations and
question for testing apply to your case, of course.  So, let me point
you at https://cygwin.com/ml/cygwin/2015-03/msg00380.html

Let's discuss this further, please.  This behaviour isn't nice and
I would like to avoid it in the next Cygwin release.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* RE: mintty startup message: /sbin/nologin: No such file or directory
  2015-03-21 16:47   ` Corinna Vinschen
@ 2015-03-23  7:40     ` Habermann, David (D)
  2015-03-23 19:17     ` Linda Walsh
  1 sibling, 0 replies; 7+ messages in thread
From: Habermann, David (D) @ 2015-03-23  7:40 UTC (permalink / raw)
  To: cygwin


>LDAP can't have to do with that, in theory.  The whole mechanism should give a sane result even if LDAP >connections fail, because the core part is the call to LookupAccountSid and that's the only call which has to >succeed.

Certainly my speculation of the cause is exactly that....speculation.  My observations, however, are sound and very reproducible on my machine.  If cygserver starts up rapidly after boot the result is not desirable, whereas if cygserver start up is delayed (either done manually or via delayed service startup), then the result is good.

I'll be happy to do any testing you might like on Monday, but this weekend is a busy one for me so I likely won't be able to do much until the work-week.

Dave

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

* Re: mintty startup message: /sbin/nologin: No such file or directory
  2015-03-21 16:47   ` Corinna Vinschen
  2015-03-23  7:40     ` Habermann, David (D)
@ 2015-03-23 19:17     ` Linda Walsh
  1 sibling, 0 replies; 7+ messages in thread
From: Linda Walsh @ 2015-03-23 19:17 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:

> 
> As for /sbin/nologin itself, I'm not sure why I did that without
> providing an /sbin/nologin executable.  This is very clearly an oversight
> on my part.
> In theory it should be part of the util-linux package, but it isn't for
> some reason.  Yaakov, any idea why?  Is it a problem to add it?
---
	This works on a linux machine:

uuencode /bin/nologin </bin/nologin
begin 664 /bin/nologin
M(R$O8FEN+V)A<V@*96-H;R!4:&ES(&%C8V]U;G0@:7,@8W5R<F5N=&QY(&YO
5="!A=F%I;&%B;&4N"F5X:70@,0H*
`
end
---
(FYI: cat /bin/nologin:
#!/bin/sh
echo This account is currently not available.
exit 1

---
A binary version is listed as being in util-linux-2.23.2, FWIW.



--
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] 7+ messages in thread

end of thread, other threads:[~2015-03-23 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21  4:05 mintty startup message: /sbin/nologin: No such file or directory Mirko Vukovic
2015-03-21  6:45 ` Andrey Repin
2015-03-21 16:41 ` Habermann, David (D)
2015-03-21 16:47   ` Corinna Vinschen
2015-03-23  7:40     ` Habermann, David (D)
2015-03-23 19:17     ` Linda Walsh
2015-03-21 20:03 ` Corinna Vinschen

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).