MSFN Forum: Shutting Down Server 2003 - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Shutting Down Server 2003 Rate Topic: -----

#1 User is offline   Bad boy Warrior 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 393
  • Joined: 03-February 05
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 February 2005 - 12:37 PM

I want to have 1 user who can only shutdown/ restart the server when required and NOTHING ELSE (not even run programs on the server. Any of you guys have ideas on what woud be the best approach on doing this or what type of user should i create?

thx


#2 User is offline   valter 

  • Professor
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 15-June 04

Posted 06 February 2005 - 01:16 PM

any user, just assign him right for this through gpo

#3 User is offline   Bad boy Warrior 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 393
  • Joined: 03-February 05
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 11 February 2005 - 07:40 AM

i did that but everytime ths user tries to access the server through RDP - it says it cant due to eprmissions. I dont want to assign admin righst as this would defeat the point.

thx

#4 User is offline   jamesas 

  • Member
  • PipPip
  • Group: Members
  • Posts: 173
  • Joined: 09-September 04

Posted 11 February 2005 - 08:32 AM

you will have to assign the right for him to use rdp and be able to login and you also might want to apply a few gpos to block him from accessing any harddrives and so forth

#5 User is offline   Bad boy Warrior 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 393
  • Joined: 03-February 05
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 14 February 2005 - 08:24 AM

i right clicked mstsc.exe and added the user that can shutdown the system but i had the exact same error? what did i do wrong?

thx

#6 User is offline   Br4tt3 

  • World famous sausage eater...
  • PipPipPipPip
  • Group: Members
  • Posts: 566
  • Joined: 20-April 04

Posted 18 February 2005 - 06:34 AM

do u get the error of:

"u r not allowed to logon interactively" (or something like that?) when u try to logon using rdp? in that case it is a matter of permission...

if you dont want the guy to logon to a server for example just to shut down the server.... add a service account that can do it for ya and then try to run within that security context from within a script for example.

vbscript would it for u, where u could hide the pwd and user that u r trying to connect with using crypto (.vbe) and distribute the script to the user or run it remotely... or place in scheduler maby, what do I know...

Hmm... something like this maby...

CODE <Begin> :

'*******************************************************************
' Purpose: Script for restarting a server (not DC)
' Author: Br4tt3
' Date: 2004-09-22
' Company: XXXXXXXXXXXXXXXXXXX
' Version: 0.1
'
' Requirement: Obtain RunAsPwd.exe (freeware) and place in system32.
' Also create an account with appropiate permission in correct
' OU structure. Must be run locally on machine. Remote exec
' not supported.
'*******************************************************************

Option Explicit

Const DomainAccount="ShutdwnAdmin@company.com"
Const DomainPassword="ShutdwnAdminpwd"

'*****************************************
' Adding User "ShutdwnAdmin" from AD to
' local Administrator group of computer.
'*****************************************

Dim objInfo, objGroup, objUser, strComputer

Set objInfo = CreateObject("ADSystemInfo")

strComputer = "."
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Set objUser = GetObject("WinNT://" & objInfo.DomainShortName & "/ShutdwnAdmin,user")
objGroup.Add(objUser.ADsPath)

'***************************************************************
' Mark: Using RunAsPwd to run the .exe in another security context
' than logged on user. Obtain the .exe from inet as it is
' freeware.
'***************************************************************

Dim WshShell, objSys, WshNetwork, Command

Set WshShell = WScript.CreateObject("WScript.Shell")
Set objSys = CreateObject("ADSystemInfo")
Set WshNetwork = WScript.CreateObject("WScript.Network")

Command = "%WINDIR%\system32\runaspwd.exe -u:" & DomainAccount & " -p:" & DomainPassword & " -e:" & "%WINDIR%\system32\shutdown.exe -r"
WshShell.Run Command, 0, True

'***************************************
' Remove Global Account "ShutdwnAdmin"
' from local Administrators group
'***************************************

Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Set objUser = GetObject("WinNT://" & objInfo.DomainShortName & "/ShutdwnAdmin,user")
objGroup.Remove(objUser.ADsPath)



Tried it once here, atleast the machine rebooted... hopes this can solve it for u..

#7 User is offline   un4given1 

  • Elaborate Dreamer
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,796
  • Joined: 25-September 03

Posted 22 February 2005 - 11:16 PM

Just run this from a command prompt...

shutdown -i


It will give you a GUI shutdown program. Input the computer name to shutdown and there you go.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy