• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

Login script executes from which server?

I have a W2k server and a Windows Server 2003 in the same domain and am running AD.  I am not having very reliable results running the script to simply map some drives.  I have been making the adjustments to the scriptacct.bat file that looks like this:
:rem script for accounting group
net use M:  \\ccs3\acct$ /persistent:no
net use P:  \\ccs3\public /persistent:no
:rem net use H:  /delete
:rem if exist H: net use H: /delete /y
:net use H:  \\ccs3\%Username%$ /persistent:no
:rem net use M:  \\ccs3\acct$ /persistent:no
:rem if exist p: net use p: /delete /y
----------------------------------------------------------------

This file is located in this directory \\servername\sysvol\sysvol\domainname\scripts\  on the 2003 server, but seems to replicate to the W2k server in the like directory.  

I am only trying to get it to execute a simple mapping command on XP desktops.  I have the profile tab for the test users to read:  scriptacct.bat

I have been also including a home directory in the profile tab and sometimes in the script.

The drive mappings do not work from a cold boot.  If I then do a logoff/logon, the mappings work very consistently.  Is there something strange about where I am putting this script?  I would like to think that I have migrated all of the important services to the 2003 server, except for some printing services.  When I browse the network from a WIN98 desktop I can only see the "logon" share on the original W2K server.

The bat file works very well if I execute it manually after bootup.  

I have spent hours trying to find a pattern.  The best that I can figure is that the script does not execute from a cold boot, or a restart. A subsequent logon/logoff seems to do the trick.

What is wrong with my process?

0
winventions
Asked:
winventions
  • 5
  • 3
1 Solution
 
NJComputerNetworksCommented:
"This file is located in this directory \\servername\sysvol\sysvol\domainname\scripts\  on the 2003 server, but seems to replicate to the W2k server in the like directory.  "    Scripts are replicated to every DC by default.  \\serverdc\netlogon directory is how the clients get to this infomration....


0
 
NJComputerNetworksCommented:
So, if I understand you right, you have a logon script that basically does this:

net use M:  \\ccs3\acct$ /persistent:no
net use P:  \\ccs3\public /persistent:no

The script name is scriptacct.bat

You have copied the scriptacct.bat file to the \\serverdc\netlogon directory.


-------------------------------

I would recommend adding this to your script (This will make sure that the clients doesn't have these drive letters already in use)
Net use M: /delete
net use M:  \\ccs3\acct$ /persistent:no
Net use P: /delete
net use P:  \\ccs3\public /persistent:no

"The drive mappings do not work from a cold boot.  If I then do a logoff/logon, the mappings work very consistently."  I wonder if there are any event viewer errors on the client after reboot.  Can you check this..

Make sure that your clients TCP/IP properties is setup to point DNS to your internal Windows 200X DNS servers.  The clients should only point to internal Windows 200x DNS servers....not to ISP DNS servers.

For example:

Server NAme:  DC1Server
IP: 10.10.10.5
Subnet: 255.255.255.0
Gateway: 10.10.10.1
DNS: 127.0.0.1 or 10.10.10.5   <-- internal Windows DNS must be pointed locally not to ISP DNS servers

Client NAme:  Desktop1
IP: 10.10.10.50
Subnet: 255.255.255.0
Gateway: 10.10.10.1
DNS: 10.10.10.5   <-- internal Windows DNS must be pointed to internal Windows 200x server not to ISP DNS servers.









0
 
NJComputerNetworksCommented:
what OS's are you client machines?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
winventionsAuthor Commented:
So, if I understand you right, you have a logon script that basically does this:

net use M:  \\ccs3\acct$ /persistent:no
net use P:  \\ccs3\public /persistent:no

The script name is scriptacct.bat

You have copied the scriptacct.bat file to the \\serverdc\netlogon directory.


This is correct.   I did have some other lines that were disconnecting from the drive letter, but remarked them to simplify the script.  I was getting some errors about files already being open on those drive and had added the /y parameter to force the disconnect.

You asked about event errors on the cold reboot.  I do see that there are some errors that say they cannot find the domain controller for your computer network.  The specified domain either does not exist or could not be contacted.  Group policy process aborted.

I do have my DNS pointed to my internal server, but also to the ISP DNS.  I have been adding my server DNS, because it was not be pushed by the DHCP server.  Is this the root problem?


0
 
winventionsAuthor Commented:
My client machines are Win98, 2K and Xp.  I was planning on adapting the script to each OS.  I may be able to get rid of the 98 machines before I implement this script.

Thanks.
0
 
NJComputerNetworksCommented:
"I do have my DNS pointed to my internal server, but also to the ISP DNS.  I have been adding my server DNS, because it was not be pushed by the DHCP server.  Is this the root problem?"  This could very well be the problem.

You need to point all clients and server of a Windows 200x domain to internal DNS servers only.  The members of the domain need DNS to "Talk" to active directory.

So, please make sure that you have this setup:

Make sure that your clients TCP/IP properties is setup to point DNS to your internal Windows 200X DNS servers.  The clients should only point to internal Windows 200x DNS servers....not to ISP DNS servers.

For example:

Server NAme:  DC1Server
IP: 10.10.10.5
Subnet: 255.255.255.0
Gateway: 10.10.10.1
DNS: 127.0.0.1 or 10.10.10.5   <-- internal Windows DNS must be pointed locally not to ISP DNS servers

Client NAme:  Desktop1
IP: 10.10.10.50
Subnet: 255.255.255.0
Gateway: 10.10.10.1
DNS: 10.10.10.5   <-- internal Windows DNS must be pointed to internal Windows 200x server not to ISP DNS servers.

Then to get Internet DNS resolution working, you can enable DNS forwarding on each Internal Windows 200x DNS server.  To do this go into the DNS console.  Right click your DNS server name in the left hand pane...and choose PROPERTIES from the drop down box.  Then click the FORWARDERS tab.  Enter the IP address of your Internet Router or enter the IP addresses of the ISP DNS servers.  Do this on each Internal Windows DNS server...

Then test to make sure you can get out to the internet.,,,using IE.

You must get those errors to go away on the client computers before going too crazy with your logon script.  It sounds to me like the client machines are not "talking" to active directory correctly.  This would prevent the logon script from running.  You may have to remove the computer from the domain and re-add it to the domain.


0
 
winventionsAuthor Commented:
I see your post and am testing your comments.  Thanks.
0
 
NJComputerNetworksCommented:
ok
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now