Reader to Reader - 18 Feb 2000

Downloads
8188.zip

\[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.

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