Reader to Reader - 18 Feb 2000
This month, one scripting solution is provided: Giving NT Users the Right to Change System Time
February 18, 2000
[Editor's Note: Email your scripting solutions (400 words or less) to Reader to Reader at [email protected]. Please include your script and phone number. We edit submissions for style, grammar, and length. If we print your contribution, you receive $100.]
In Windows NT workstations, only the Administrator and Power User groups have the permissions needed to change the system time. However, with ntrights.exe, you can give NT users the right to change the system time on their workstations without giving them Administrator permissions.
Ntright.exe is a Microsoft Windows NT Server 4.0 Resource Kit utility that lets you assign a specific right to a user or group. When you make an NT workstation a member of a domain, the Domain Admin, Domain Users, and Domain Guest groups become members of the local Administrator, Users, and Guests groups. As a result, you can use the Net View command and the script NTRights.bat in Listing 1 to give the local Users group of each NT workstation the right to change the system time.
To begin, type
Net view /domain:domainname>>servers.txt
at a command prompt, where domainname is the name of your domain. When you run this command, it lists that domain's computers in the file servers.txt. In servers.txt, remove the first three lines. In the remaining lines, remove the comments. Each line must contain only
\computername
where computername is the name of the machine.
Next, run NTRights.bat, which uses ntrights.exe. Figure 1 contains the syntax for this utility. NTRights.bat uses the For command to loop through each machine in servers.txt, giving the local Users group the SeSystemtimePrivilege right. After you run this script, your users can change the system time on their workstations.
—Jorge Roque
[email protected]
About the Author
You May Also Like