Discussion Locked

using runas to set time on wan

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

Situation: Server_1\Domain_1 and Server_2\Domain_2 have set up identical logon id and password for test taking on W2K workstations. Also another account with administrative rights to change system time on the workstations was set up on both servers.

The logon script on Server_2\Domain_2 is as follows:
*****************
echo on
NET USE p: \\Server_1\APPS
runas /user:domain_2\time "net time \\Server_1 /set /y"
pause
:END
exit
*****************

No error messages appear, but the time on the workstation does not change.

7 replies

by duwaned

You have not given enough information, but I will try to give some pointers in the right direction.

I have seen similar authentication problems on complex NT domain structures. Commands will be executed without any errors, but without making thechanges that the commands were supposed to make.

Are you running separate NT domains, or a 2000 active directory?

If you are running active directory, are the 2 domains in the same tree? If you are using NT domains, are there trusts in place between the 2 domains?

If there are no trusts in place (NT domains), or the domains aren't in the same tree (active directory) then this could be the problem. The SID for the 2 users that have been created in the different domains is different. These 2 users will be considered to be different users because the SIDS differ. The account from Domain_2 will not have permissions on Domain_1 to change anything that requires admin privileges.

A better way to do this would be to use the account from Domain_1 in the runas command to change the time on the server server_1. You can still get the time from an un-trusted domain.

I hope that this makes some sense! It doesn't seem to when I read over it!

Regards.
Duwane

by ntoz

Another way to accomplish what your trying to do is to utilize Windows 2000 built in Time Service. In Windows NT, using a logon script to set time was the method of choice. Windows 2000 has drasticaly improved the method of setting time. If you use the built in service w32tm to set your workstations times, its done via the SNTP. Its a service called Windows Time and you can find it in your services MMC. You can find it by using the MMC snap in or going to contol panel, administration, services.Rather then re-hash it here, let me point you to:

http://www.win2000mag.com/Articles/Index.cfm?ArticleID=8383

Using the built in time service is a much better method of keeping time under Windows 2000. Thankfuly MS has improved this service!
Pete

by ntoz

One more thing, the real neat thing about this is since its a service, it sets the time at Boot up rather then logon. The time is set correctly even if a user doesnt logon!

Pete

by tomtechjo

This problem still has not been resolved; however I know I need to fill in some blanks and have had other more pressing issues. I will post an update to this question in the near future. It will be utilized for the Fall 2001 school semester.

This discussion is closed to new replies.