On Mar 6 09:45, Bill Stewart wrote: > On Wed, Mar 6, 2019 at 8:34 AM Corinna Vinschen wrote: > > > On Mar 6 08:38, Bill Stewart wrote: > > > On Wed, Mar 6, 2019 at 7:34 AM Corinna Vinschen wrote: > > > > On Mar 6 15:17, Corinna Vinschen wrote: > > > > > But the old Systems like Windows 7 don't want to play nice. > > > > > > > > > > - On Vista and Windows 7 WOW64, MsV1_0S4ULogon isn't implemented > > > > > at all, which required to keep the create_token method > > > > > available > > > > > > > > > > - On Vista and Windows 7 MsV1_0S4ULogon does not work without > > > > > some user logged in locally, even if it's just the cyg_server > > > > > service account. > > > > > > > > FTR, Windows 8 / Server 2012 is affected as well, > > > > Windows 8.1 / Server 2012 R2 is not. > > > > > > > > > > Question is, what is a good solution? Reverting cyglsa as > > > > > well to allow the old methods to work as before? This is > > > > > the opposite of what I had hoped to accomplish :( > > > > > > I agree that the new S4U logon method is by far the best solution. > > > > > > It seems to me that this MSV1 S4ULogon behavior on versions older than > NT > > > 6.3 (Vista/Srv2008/Win7/Srv2008R2/Win8/Srv2012) is not expected. > > > > > > What precisely happens when Cygwin uses MSV1 S4ULogon on versions older > > > than 6.3 before a user has logged on? > > > > MsV1S4ULogon returns with STATUS_NOT_SUPPORTED. Funny status code, > > given it works if some user already logged in by other means... > > OK, so here's another potential workaround that doesn't require running the > service as a specific user... > > Create a scheduled task to run using the following settings: > > General -> Run using user account - > choose a local account > General -> "Run whether user is logged on or not" > Triggers -> Run at system startup > Actions -> Start a program -> Program/script: %SystemRoot%\Cystem32\cmd.exe > Actions -> Start a program -> Add arguments: /c exit > > Full password logon is required (seems we can't use "do not store password" > option). > > The local account does not have to be a member of Administrators, but it > does require user right "Log on as a batch job" (SeBatchLogonRight). > > In my prefunctory testing this seems to fix this problem. > > Does this work? This does indeed work in my local testing on Windows 7, with a local dummy user just for this scheduled job and sshd running under SYSTEM. Now, if that's a feasible workaround for users of these older systems...? Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer