RE: Why shutdown become logoff in 2008 with user of Users group?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Jojo,

Based on my understanding, your code of calling ExitWindowsEx(EWX_FORCE |
EWX_POWEROFF, 0) does not work(system performs logoff instead of shutdown)
on the Windows Server2008 machine with the security token in Users group.
If I have misunderstood you, please feel free to tell me.

My first suspicion is that the Users group security token may do not have
SE_SHUTDOWN_NAME security priviledge by default on Windows2008. To check
this, I go to secpol.msc->Local Policies->User Rights Assignment->"Shut
down the system" option. Only Adminstrators and "Backup Operators" groups
are assigned this priviledge by default on Windows2008. Since the Users
group does not have this priviledge, your code will not function correct
with Windows2008 Users group security token.

Almost all client version of Windows assign SE_SHUTDOWN_NAME privilege to
Users group by default, while server version of Windows don't. For example,
my Vista machine gives SE_SHUTDOWN_NAME to Users group, while my
Windows2003 machine do not. This is a designed choice because it is not
safe to allow a normal user to shutdown a server machine. For Windows
Server, multiple users can logon and use the same system, so the shutdown
operation will affect all the users on the system.

Actually, if you only want to shutdown the system, you can initiate the
shutdown in the Windows Service using Local System token instead of using
the interactive Users group token. This should resolve your problem.

Finally, since this is not a Win32 GDI programming questions, I recommend
you post in microsoft.public.platformsdk.security newsgroup in future.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: Why shutdown become logoff in 2008 with user of Users group?
    ... 0) does not work(system performs logoff instead of shutdown) ... on the Windows Server2008 machine with the security token in Users group. ... Microsoft Online Community Support ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Why shutdown become logoff in 2008 with user of Users group?
    ... I have used the Local System token to shutdown the computer with specified ... on the Windows Server2008 machine with the security token in Users group. ... SE_SHUTDOWN_NAME security priviledge by default on Windows2008. ... Microsoft Online Community Support ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Unprivileged users cannot run App...
    ... This is usually caused by your installer requiring write access to Program Files and/or to HKLM, neither of which is permitted to members of the Users group. ... > users can run a third-party application on Windows ... > Vernier Software & Technology ...
    (microsoft.public.windowsxp.security_admin)
  • RE: Faxing from one client doesnt work...
    ... It seems like the issue is this Windows ... folder will be used to store the temporary FAX files. ... When the Users group doesn't been granted the proper permission on the temp ... On the problematic Windows XP client computer, ...
    (microsoft.public.windows.server.sbs)
  • Re: Delphi 7 Lite -- Big Big Money for Borland
    ... >Access tables which are more popular than Paradox and is not a dead ... If some support for TDataSet descendents is included in an economical ... Chair, Delphi/Paradox SIG, Cincinnati PC Users Group ...
    (borland.public.delphi.non-technical)