JSI Tip 1736. How do I use Resource Kit tools to grant Domain Users the right to change system time on domain members?


Using tools from the Server Resource Kit Supplement 4.0, you can create a batch file that will use NETDOM to enumerate all domain members and NTRights to set the right to change system time for Domain Users into the members local SAM. This will allow any Domain User to process a logon script that contains NET TIME \\ServerName /SET /YES

ChgTimeR.bat uses the following syntax:

ChgTimeR <Drive:>\Folder\Report_File.log

where <Drive:>\Folder\Report_File.log is the full path to an output file that contains the results of script.

ChgTimeR.bat contains:

@echo off
setlocal
if \{%1\}==\{\} goto error
if exist %1 del /q %1
set report=%1
for /f "Skip=6 Tokens=1-3*" %%i in ('netdom member') do call :right "%%l"
endlocal
goto end
:error
@echo Syntax ChgTimeR "<Drive:>\Folder\Report_File.log"
endlocal
goto end
:right
ntrights -u "domain users" -m %1 +r SeSystemTimePrivilege >> %report%
:end

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish