Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripts won't run

Status
Not open for further replies.

twigs1981

IS-IT--Management
May 29, 2002
52
0
0
US
I'm trying to do the normal time sync script, I have the script in the normal scripts directory, I have updated the user profile to excute the script, and I have synced the accounts, but when users log in it is not executing. I have tested the script seperatly and it works fine but it will not execute from the server.

any ideas as to what I am doing wrong?

Thank you in advance
 
Does the user have the advanced right on the local system to changed the system time?
 
I'm testing as an admin so I have to say yes. :-/
 
Please post your script. I image that in your logon script you probabaly have a (net time) statement. How does your PDC get its time? Have you considered the NTResource Kit utility (Timeserv)?
 
Script:
net time \\PDC /set /yes

I haven't considered much of anything since I'm not the head admin and I don't normally work with windows so I don't know the tools available. :-/ What is Timeserv?
 
Timeserv is and executable that runs as a service. The way you normally configure it is the you setup timeserv on your PDC. Your PDC recieves its system time from some other source like an atomic clock which are freely available. There are a number of different ones. I use the Navys clock. Your PDC then becomes a master timesource for all machines below it. You then setup timeserv on all of your workstations and everytime the machine boots it queries the PDC for the right time it should have. Then the workstation queries the PDC from time to time for any changes. But for what tou are trying to accomplish try changing the line:

net time \\PDC /set /yes
to
net time /DOMAIN:yourdomainname /set /yes
 
Sounds great! But I still do not have any idea why the scripts are not running that are listed in the profile? That is where most of my problem is.
 
So if you temporarily remove all of the code from the logon script and just add some simple lines in it like

color 17
Echo hi
Echo I am working
Echo I am a logon script
Echo ...................
pause

Do you see this when you logon as the user you are testing as. And, if your logon script is called logon.bat, you only need to type in logon.bat in the users profile Logon SCript Name box. I have seen people try to type in the hole path to the PDC's directory. Also, make sure that you are placing logon.bat in the PDC's

winnt\system32\repl\import\scripts directory and not the export\scripts dircetory.
 
I don't know what did the trick but I changed the file name to logon.bat and used other users and it has been working fine... Thank you for all your help and time!
 
Wierd huh, just glad I could help. Don't know if I really did or not but glad it is working...Maybe it was the changing of the net time command. Did you ever change it to what i suggested?
 
well it seems that it is intermitant(damn and I thought I was done). is it like the policy editor where it takes up to 3 logins?
 
no I didn't change it yet have to run that by another boss... polotics...
 
How big is your organization? Explain the 3 logins thing again. Just a suggestion, and I am not try step on any toes, but the way we always test logon scripts is to make a couple of dummy accounts. For example:

usera - whom is just a regular domain user
userb - whom is a domain admin
userc - whom has some special rights the may only affect accounting

Place the logon.bat in there profile, sync the entire network, and then try to logon on as each. Is this something like you are doing?
 
yeah thats what I've been doing.. some accounts work.. others don't... seems that all of the roamers, regardless of rights, work so far, but I have to verify a few things about local account rights, but I wono't be able to do that until after 3 eastern(they want me to start the skeleton of a program by 3)... this is a bigger pain than I asked for on my first day back after 4 months... and yes they knew I was coming so they waited... :-/

 
The problem is probably this. If you open up user manager for domains and open one of the computers local users on one of the machines that is not working. Then choose Polies, user rights. Find the right to Change the system time. By default, only the local computers administrator group should be list. Now, it your domin users are not part of a global group that has be added to that local computers admin group, then when the user loges on and the batch file runs then it will not change that computers time. But, if you logon with one of your domain admin accounts that is running the batch file then it will work. The reason is, when a computer joins the nt 4 domain, the dominn administrators global group is automatically added to the workstations local administrators group, jus given it the right to change the time.
 
well it looks like the boss has given up for now.. but thanx for everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top