Page 1 of 1 1
Topic Options
#32100 - 2002-11-08 10:04 PM user privilege on NT 4.0 to set time
allbymyself Offline
Just in Town

Registered: 2002-11-08
Posts: 2
I am trying to write a logon script that will set the time on a NT 4.0 workstation. The users are not local admin, therefore they have no rights to change the time (which is the way we want it). I have composed the script as follows (based on other postings here):

if exist %WINDIR%\nettime.exe goto set_rights
copy "%0\..\nettime.exe" "%WINDIR%"
copy "%0\..\rtzone.exe" "%WINDIR%"

:set_rights

%0\..\ntrights +r SeSystemtimePrivilege -u Users

NET TIME %LOGONSERVER% /SET /Y

%0\..\ntrights -r SeSystemtimePrivilege -u Users

goto Final
:Final

When I run this as a regular user, I get the following errors:

***Error*** OpenPolicy -1073741790 (when it tries to grant the permissions).
After the Net time command executes I get the message
System error 1314 has occurred.
A required privilege is not held by the client.
What do I need to do to correct this?
[Confused]

Top
#32101 - 2002-11-08 10:07 PM Re: user privilege on NT 4.0 to set time
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
users do not have the rights to change rights.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#32102 - 2002-11-08 10:10 PM Re: user privilege on NT 4.0 to set time
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
what you need to do, is stop playing with net time, and make yourself an admin script to PUSH nettime.exe out, configure it, and let it control setting the time.

This will be an administrative script, run by you, and then the user privs will not matter.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#32103 - 2002-11-08 10:28 PM Re: user privilege on NT 4.0 to set time
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Go with W32Time.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#32104 - 2002-11-08 10:32 PM Re: user privilege on NT 4.0 to set time
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
My recommendation, too. Get the Windows Time service W32Time and install on all Windows NT computers. Make a computer primary time server, some others secondary, and point the Windows 2000/XP computers to any of the secondary time servers.

It's a very straight-forward thing and even documented at Microsofts website.
_________________________
There are two types of vessels, submarines and targets.

Top
#32105 - 2002-11-11 09:41 AM Re: user privilege on NT 4.0 to set time
ash wilson (kyosei) Offline
Getting the hang of it

Registered: 2002-04-22
Posts: 58
Loc: auckland new zealand
When you said 'that's the way we want it' it was not apparent if you didn't want them in Local Admins group or not be able to change the time?

Power users can change time so if you really want to use a Kix script you could add each user to their local Power Users group then shell/run 'net time /DOMAIN:domainname /set' will work ok, or just use the Kix command 'settime'.

[ 11. November 2002, 09:49: Message edited by: ash wilson (kyosei) ]
_________________________
KYOSEI. There are only three groups of people that can count. Those that can, and those that can't.

Top
#32106 - 2002-11-11 09:50 AM Re: user privilege on NT 4.0 to set time
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
which again is the easiest way to go.
_________________________
!

download KiXnet

Top
#32107 - 2002-11-11 03:17 PM Re: user privilege on NT 4.0 to set time
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
To me, the easiest way to go is using the Windows Time Service because once the service is installed and running you don't have to worry about it at all.

Microsoft has an excellent white paper about installation of the Windows Time Service in NT4 and AD domains.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.056 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org