Using WSH login scripts to assign temp local system admin previllege 
Author Message
 Using WSH login scripts to assign temp local system admin previllege

Using WSH login scripts to assign temp local system admin previllegeI achiev this by using the SU command from the Resource Kit.  To use it do something like this:

Set wshShell = WScript.CreateObject("WScript.Shell")
Command = "cmd /c net time /set /y"
nReturnCode = wshShell.Run("password|c:\winnt\system32\su.exe ADMINISTRATOR" & Command & "DOMAIN")

a better solution is to put a batch file as part of the command line so that yopu can run all commands that require admin.  Obviously this presents a security risk since it transmits the password in plain text and is stored in a user-readable file.

Another alternative is to use the scheduler service to run commands in the context of the system account, however this will not work in this case because the user must have domain access which the system account does not.

Hope this is helpful.

  Hi All,

  Can I use WSH login scripts to let local users (they are not currently assigned with local admin right)to be granted local system admin previllege temperoraly while the script is run that will sych their local system time with the time server (by using wscript.shell run method). I don't want to grant local users system admin rights. Is that possible? thanks.                        



Tue, 11 Dec 2001 03:00:00 GMT  
 Using WSH login scripts to assign temp local system admin previllege
Using WSH login scripts to assign temp local system admin previllegeAn even
better solution, IMHO, is to grant all users (or a certain group) ability to
change the system time of your workstations.  User User Manager's policies
menu for this.  There's no security risk this way, since you want them to
have only that privilege anyway.

Lee


I achiev this by using the SU command from the Resource Kit.  To use it do
something like this:

Set wshShell = WScript.CreateObject("WScript.Shell")
Command = "cmd /c net time /set /y"
nReturnCode = wshShell.Run("password|c:\winnt\system32\su.exe ADMINISTRATOR"
& Command & "DOMAIN")

a better solution is to put a batch file as part of the command line so that
yopu can run all commands that require admin.  Obviously this presents a
security risk since it transmits the password in plain text and is stored in
a user-readable file.

Another alternative is to use the scheduler service to run commands in the
context of the system account, however this will not work in this case
because the user must have domain access which the system account does not.

Hope this is helpful.

Hi All,
Can I use WSH login scripts to let local users (they are not currently
assigned with local admin right)to be granted local system admin previllege
temperoraly while the script is run that will sych their local system time
with the time server (by using wscript.shell run method). I don't want to
grant local users system admin rights. Is that possible? thanks.



Mon, 17 Dec 2001 03:00:00 GMT  
 Using WSH login scripts to assign temp local system admin previllege
Why not set up a Time server service ???
TimeServ is delivered with the resource kit. Install it on all clients, and
on one server.
This service can run on every client (as local adminstrator), and
synchronize time with a PRIMARY or SECONDARY timeserver somewhere on the
connected lan/wan. A client with TimeServ installed even can use an
intranet/internet NTP server to synchronize.
A TimeServ server cannot be set up as a NTP server,
If your LAN is not connected to the internet, to use one of the many NTP
servers there, use Tardis   http://www.kaska.demon.co.uk on a local server
with the 'correct' time (GPS clock, DCF77 clock)


Using WSH login scripts to assign temp local system admin previllegeHi All,

Can I use WSH login scripts to let local users (they are not currently
assigned with local admin right)to be granted local system admin previllege
temperoraly while the script is run that will sych their local system time
with the time server (by using wscript.shell run method). I don't want to
grant local users system admin rights. Is that possible? thanks.



Sun, 23 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP needed! Local system permissions on login script

2. Using a WSH Script as a Login Script

3. Adding non-admin users to local admin group

4. enumeratin local admin group script

5. using wsh as login script language

6. login scripts using WSH in vbscripts

7. Script to Change Local Admin Users to Power Users

8. Run Script as Local Admin

9. Login script problem - Trying to assign shortcuts via group ownership

10. Login script problem - Trying to assign shortcuts via group ownership

11. Assigning login scripts

12. System Admin Scripting Webcast

 

 
Powered by phpBB® Forum Software