Solved

RUNAS Command syntax in login script.

Posted on 2006-07-17
3
6,629 Views
Last Modified: 2013-12-28
(NT4 Domain & DCs, Clients - NT4, W2K, XP (server used for time syncronisation > W2K))

I am trying to configure time syncronisation through login scripts.   I have the following command in the login scripts at the moment;

net time \\servername /set /yes

This works fine, but only as administrator, and despite having changed Group Policy, the local settings still stops syncronisation with user permissions, (that's everyone but me).

Is it possible to use the RUNAS command to overcome this, such as;

runas /profile /user:domainname\administrator net time \\[server] /set /yes

Questions - Is the syntax correct?  Would it work? When the login script ran, would it ask for admin's password?

I know I could answer such questions through testing, but the underline problem of incorrect time on clients machines are effecting other services, and needs to be resolved ASAP.   I would appreciate your advice, Regards, David.
0
Comment
Question by:Dave-sysadm
3 Comments
 
LVL 83

Expert Comment

by:oBdA
ID: 17121735
runas isn't available in NT4, and doing this in a logon script isn't such a good idea; it means that the time will only be synchronized when someone is logging on to the machine, which can be quite some time on a server.
On your W2k/XP clients, just open a command prompt and enter
net time /setsntp:IP.of.your.timeserver
net stop w32time
net start w32time

How to synchronize the time on a Windows 2000-based computer in a Windows NT 4.0 domain
http://support.microsoft.com/?kbid=258059

On your NT4 machines, install the w32time service, and let them synchronize with the W2k machine as well (downloadlink is in the article):
Changes to the W32Time and TimeServ Utilities
http://support.microsoft.com/?kbid=246145
0
 
LVL 28

Accepted Solution

by:
Michael Pfister earned 500 total points
ID: 17121762
runas asks for the admin password, so this is no solution.
Easiest way is to give your users the "Adjust time" privilege.
Since you're an NT4 this can't be done via GPO, so you have to run a command for all of your workstations.
The command is ntrights.exe, available in the Microsoft Ressource Kit matching your OS.

Syntax is

ntrights -u Everyone +r SeSystemTimePrivilege -m \\<machine to perform the operation on>

After that, any user can adjust the system time by issuing a net time ...

Hope it helps,

Michael
0
 
LVL 1

Author Comment

by:Dave-sysadm
ID: 17122287
Many Thanks

David
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
windows explorer default details view 10 57
Parsing an RSS Feed 4 16
Windows Services - Run a Program Grey Out 3 23
Reset server 2008 R2 default permissions 2 11
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question