Discussion Locked

Time Sync and Logon Scipts for NT

0 helpful
15 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am wondering how to write logon scripts for NT users. I want to sync the time on the workstations with the server time. I have a vague idea of how to accomplish this but due to my experience level I can't get it to work. Any assistance would beappreciated. I am only dealing with 5 users who can all have the same logon script.
thanks,
Brian

15 replies

by nmead

Change the %domainname% to your Domain Name and put this in the users logon script:

net time /domain:%domainname% /set /y

hth,
Nate

by elsterb

I have the correct commands...how do I begin to generate a logon script, where do i store it, how do i place it into effect
i am really new at this...sorry for such elemetary questions.
brian

by mike o

Also make sure you're putting the batch file in the Netlogon shared folder on your domain controllers.

In addition to the above, you can synch it to a specific server like so:
net time \\YourServer /set /y

Take care,
Mike
www.mikeoliveri.com

by ebob

A whole different approach is to load a time client on each system that loads when the system boots. You don't need a batch file, and it is less likely to get "monkeyed with".

Here's a link for lots of info:

http://www.eecis.udel.edu/~ntp/

by nmead

The logon script (logon.cmd (if NT clients only) or logon.bat) is put in the NETLOGON share of your Domain Controllers (atleast the PDC and replicated to the BDC's) then go into User Manager and highlight(CTRL and Click) the users that you want to run this script and press enter. Now click the 'Profile' button and there you will see a line for the logon script. Just enter in the name of the script (logon.cmd) DO NOT USE the UNC path (\\%PDCNAME%\NETLOGON\logon.cmd) Now logoff of the workstations and back in and the logon script will now run.

hth,
Nate

by valachi

The best help that you can get to write NT scripts is to check ntcmds.hlp for all the commands allowed by the NT shell. You should also install and use the NT Resource Kit - it has many, many commands that can be ran from the command prompt and so used in batches. Many interesting tips and batches (from which you can learn many things) can be found at www.jsiinc.com. Btw, pipe also in a file the "for /?" and you will find a very good help, undocumented otherwise by Microsoft.

by mike_setter

... and don't forget that the clients will need local permissions to change the system time otherwise they'll get a permissions error when the line in the logon script is run.

Logged on as the local Administrator run the User Manager and select Policies/User Rights.
Select 'Change the system time' as the right and I'd suggest granting in to Domain Users which saves you having to assign it to each user who can log in on that pc.

Hope this helps.

This discussion is closed to new replies.