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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script not Taking Affect? 1

Status
Not open for further replies.

OverDrive

IS-IT--Management
Dec 11, 2000
268
0
0
US
I have a logon script I am trying to execute to my clients to automatically map network drives...

The logon script is named logon.bat and looks like this

net use m: \\server\c
net use n: \\server\d

I am new to this logon script thing, so I am unfamiliar with how they work...

This obviously is not... can anyone show me an example of how to accomplish the above in a simple scipt?

Thanks
Chance~
 
That is actually a valid script...

net use m: \\server\c
net use n: \\server\d

I'm assuming you have shared 2 folders with the sharenames as c and d.
You may have just given these as examples, but you shouldn't share the roots of your drives on a server, especially the c: drive.
You then need to put the logon.bat file in the netlogon share, typically in c:\sysvol\domain\scripts.
You then need to specify the logon script in the properties of each user's account in active directory users and computers (I'm assuming you have an ad domain).

Assuming the user's have share and ntfs permissions to the shares, that should be it.

Matt J.

Please always take the time to backup any and all data before performing any actions suggested for ANY problem, regardless of how minor a change it might seem. Also test the backup to make sure it is intact.
 
I dont have a sysvol folder (that I can see anyways)?

I am trying to get this script to force out to everyone... I am in AD Users and Computers and have loaded the script into the GPO I created under "User Configuration" and "Windows Settings" (Logon Script).

The logon script is just on the desktop in a folder called "scripts" that is shared out to everyone. All the other policies I have created work fine, just not this one?

Any Ideas why? Or how to do it properly?

Thanks
Chance~
 
I've never tried it that way, it may be possible, but the right way to do it is to place it in the netlogon share, and enter it in every user's profile. Don't have a sysvol folder? Did you install AD to a different partition/drive other than c:? What if you just browse your server, you should find the netlogon share that way.

Matt J.

Please always take the time to backup any and all data before performing any actions suggested for ANY problem, regardless of how minor a change it might seem. Also test the backup to make sure it is intact.
 
Your right... I found the netlogon share, and placed the logon script into the "scripts" folder...

I went into AD and set the users to use logon.bat in the "profile" tab, but that did not work either?

Any other ideas?

Thanks for the help
Chance~



 
Does the script run, or does nothing happen? You should see a dos screen flash by...

Matt J.

Please always take the time to backup any and all data before performing any actions suggested for ANY problem, regardless of how minor a change it might seem. Also test the backup to make sure it is intact.
 
The script does not run at all... I ran it locally on the server just to make sure it worked, and it worked fine on the server when I double click the .bat file?

Any Ideas?

Thanks
Chance~
 
When you enter it in each user's profile, you need to only type the name of the file, logon.bat

Make sure you type it just like that, no path needed.

Check it out, still no go, right click on the logon.bat, go to security tab, make sure permissions are granted to your users.

Matt J.

Please always take the time to backup any and all data before performing any actions suggested for ANY problem, regardless of how minor a change it might seem. Also test the backup to make sure it is intact.
 
Did that... still no go? Man am I baffled with this or what!!

Thanks alot man!
Chance~

any other sugg.?
 
Are these workstations attached to the domain?

Matt J.

Please always take the time to backup any and all data before performing any actions suggested for ANY problem, regardless of how minor a change it might seem. Also test the backup to make sure it is intact.
 
in the user account the script should be under the tab script.

can you attach from the workstations using command line:

net use m: \\server\c
net use n: \\server\d


If this works I'm stumped, if not, might be a DNS or Wins issue, see what happens when you just try to ping "server" from the command line.
 
I dont see a tab "script" I did however place it in the "profile tab" under the section called script?

Is this correct?

DNS is running good, I can do an nslookup fine and pind the netbios no issues...

 
*Check that... I mean the section called "Logon Script" not "script"

Thanks
Chance~

Win2k Server btw...
 
Right place.... will the machines execute the script locally?

 
Yep they do work locally on the machine they are supposed to be set to?!

I wonder what the heck is going on with this thing??

 
I figured it out!!

Here is the issues I needed to resolve...

#1 I had to make sure that my policy object that I created was on the highest level (meaning move it up to the top) so the default policy would not take it over.

#2 Then I went into my group policy object, and set it in there instead of using the "logon script" portion of the users profile (I am sure this would work, but I need this to populate on a grander scale).

#3 And finally, I had to make sure to use the Sysvol folder (like you told me) and use a BNC name rather than just a local address (such as C:\Scripts).

Once I did all that, works as advertised!

STAR FO U for helping me out and guiding me!

Thanks man!
chance~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top