General discussion

Locked

Changing user rights remotely

By blich ·
Hello, I have a network of about 400 PC users. I would like to give everyone access to change their system time. I was wondering if there was a way to do this through a batch file?? Would calcs.exe work?

Thank you...
Brian Lich
Indiana University School of Dentistry

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Changing user rights remotely

by Astute In reply to Changing user rights remo ...

The ability to change the time on an NT system is a Right that has to be granted through the User Rights Policy in User Manager.

Start User Manager (Start - Programs - Administrative Tools - User Manager)
From the Policies menu select User Rights
From the drop down menu select "Change the System Time)
Click the Add button and add any users you wish to perform this
Click OK to exit the dialog
Close User Manager
The user will need to log off and log on again

You can also use ascript which automates the granting of the right to all domain users:

Create the Addtime.bat and Addtime2.BAT files listed below.

Run Addtime.bat with administrator privileges from a computer running Windows NT. This batch file creates a list of member servers using the Windows NT Resource Kit utility Netdom.exe. The output of NETDOM gets redirected to a file, which in turn, gets parsed using the FOR command (part of Windows NT command extensions). The Addtime2.bat file gets called for each instance of \\ServerName within the Netdom.txt file. The Addtime2.bat file then issues the Windows NT Resource Kit utility Ntrights.exe to add Domain\Domain Users global group to each of the member servers Change the system time user right. The output of NTRIGHTS gets written to a file called Log.txt.

Filename: Addtime.bat

echo off
cls
echo Creating a list of member servers.
echo.
netdom member > netdom.txt
echo Adding "Change System Time" right to Member Servers...
echo.
if exist log.txt del log.txt
for /F "skip=6 tokens=4" %%a in (netdom.txt) do
call ADDTIME2.bat %%a
echo.
echo ----------------------------------------------
echo - Done! Check LOG.TXT for status information.-
echo ----------------------------------------------


Good luck

Filename: ADDTIME2.BAT

echo Adding right to %1...
ntrights -u "domain users" -m %1 +r SeSystemTimePrivilege >> log.txt

Collapse -

Changing user rights remotely

by blich In reply to Changing user rights remo ...

The above helped me, but I wanted to do it remotely with a batch file.

Thanks...

Collapse -

Changing user rights remotely

by rkelly In reply to Changing user rights remo ...

If all your clients are Windows 2000 Professional then why not use a Group Policy Object to grant users the ability to change the system time. Open up AD Users and Computers and go to the properties for the domain, select the Group Policy tab and drill down the user setting until you get to security policy settings, enable the right to change system time and wait for a couple of hours (the GPO will need to replicate through AD and be refreshed on your clients) then it will be done. If your clients are not Win2K based then a Group Policy Object will not run and you will have to do this via some for of script - the one's on Answer 1 look fine to me.

Collapse -

Changing user rights remotely

by blich In reply to Changing user rights remo ...

Unfortunately we are part of a campus, and Active Directory has not been installed yet. Once this comes around we could do it with the Win2k machines. I was wanting to be able to do it for Winnt 4.0 and Win2k.

Thank you...

Collapse -

Changing user rights remotely

by blich In reply to Changing user rights remo ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums