Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I do not understand why my log in scripts are not working.

Posted on 2006-07-24
8
Medium Priority
?
1,824 Views
Last Modified: 2008-01-09
I have a login script set in the AD in the login script under each users login profile to map each PC to specific shared data resources.
The name of the script is Login.bat and is located in a subfolder in the SYSVOL folder on our DC server; which seems to work fine.  Every new employee that logs in, gets all of the mapped drive set up in the Login.bat.

i.e.:
NET USE I: \\server1name\Data
NET USE M: \\server1name\HR Data
NET USE P: \\server1name\Accounting Data
NET USE S: \\server1name\Technology Data

The company has grown rather large and departments are more subdivided making it not necessary for everyone in the company to have access to all of the data.  Also, the server is getting loaded with all the data and I would like to move some data to another server.

I created a shared drive on server 2 and named it AR Accounting Data

I also created a new login script to put in specific users Login profile and I named it ARAD.bat

NET USE I: \\server1name\Data
NET USE M: \\server1name\HR Data \delete \yes
NET USE P: \\server1name\Accounting Data \delete \yes
NET USE S: \\server1name\Technology Data \delete \yes
NET USE J: \\server2name\AR Accounting Data

I tested this by only placing ARAD.bat in one persons profile and then logging in as them.
It did not work.  All of the old mapped drives showed up and the new mapped drive did not.

I tried to use the delete switch without the yes as well as with the yes without the "\".
When the log in screen comes up it goes too fast, but I think is shows an error ?? 1326 ?? or something like that.

What am I doing wrong?
0
Comment
Question by:tjmichael
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 10

Assisted Solution

by:ryangorman
ryangorman earned 200 total points
ID: 17168875
Add "Pause" to the bottom of your script and then run the script interactively.

e.g. \\DNSdomain.local\netlogon\login.bat

You'll be able to see the errors.

I suggest that you use
NET USE P: /delete
rather than
NET USE P: \\server1name\Accounting Data \delete \yes
0
 

Author Comment

by:tjmichael
ID: 17168909
I'm sorry, when I went to add the pause to the script, I noticed that the switches were correct

NET USE P: \\server1name\Accounting Data /delete /yes

My apologies.
0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 400 total points
ID: 17169006
Not sure if you mean it is fixed now or not but could it also be because you have a space in the share name, perhaps try with

net use p: "\\server1name\accounting data"

If it has a space in it would certainly fail on older machines such as NT, to be honest I never use spaces in share names so maybe OK in 2000/XP now I guess.

Steve
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:tjmichael
ID: 17169090
It says:

   NET USE P: \\server1name\Accounting Data /delete /yes
   A command was used with conflicting switches.

   More help is available by typing NET HELPMSG 3510

I took out the /yes and received the same error
I also took out the "/" I recieved an error:
   System error 85 occurred.
   The local device name is already in use.

The new drive had a different error message:
   System error 1909 has occurred.
   The referenced account is currently locked out and may not be logged on to.

I have rights to get into the shared folder on server2, and if I manually map the drive it maps fine.

This dosen't make sense.
0
 

Author Comment

by:tjmichael
ID: 17169143
Thanks Steve (dragon-it)  That fixed the problem with creating the new drive, but the other drives still will not delete.
0
 
LVL 51

Accepted Solution

by:
Netman66 earned 400 total points
ID: 17169281
NET USE P: /delete

You do not need the UNC path during a delete, just the drive letter.  "Yes" is used on persistent drive mappings not deletes.



0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17169285
Have you tried the " " around the command for the deletes too?

It could be it has never really worked and the drives have all been mapped by hand before?

Try this at the beginning of your script BTW for the future

net use /peristenet:no

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17169289
Oops, yes Netman66 is right of course.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question