Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

RUNAS Command syntax in login script.

Posted on 2006-07-17
3
Medium Priority
?
6,650 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 85

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 29

Accepted Solution

by:
Michael Pfister earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

650 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