[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Login Script Asking for Password

Posted on 2009-12-21
Medium Priority
Last Modified: 2012-05-08

We've had sporadic issues with our login scripts.  The script simply uses net use in order to map to some network shares.  When our users connect from home, they use Cisco VPN and then run the mapping script in order to gain access to some of their files stored on the network.  Some of the users are prompted for their username and password when attempting to run this script.  When they put in their normal usernames and passwords, they get an access denied error.  I've gone over the script tons of times and still can't figure out what the issue could be.  We have a Windows Server 2003 domain.  Here is a copy of the generic login script (with domain specific names removed).

NET TIME \\(File Server Name)/SET /YES
net use t: /delete
net use t: \\(File Server Name)\(Shared Directory 1) /persistent:no
net use s: /delete
net use s: \\(File Server Name)\(Shared Directory 2) /persistent:no
if exist del c:\temp\*.tmp

%windir%\system32\mobsync.exe /logon

Any help would be greatly appreciated.

Question by:asisson_2000
  • 3
  • 2
LVL 43

Expert Comment

by:Steve Knight
ID: 26095937
When they are remote can they resolve the servername?

Quite often with VPN setups the DNS remotely is left to local DNS on the user's network so without entries in hosts tables or other methods the name cannot be resolved, or worse using friendly DNS systems like OpenDNS or other ISP's with content blocking etc. then an unresolved name returns the IP of a server giving them a friendly error mesage...


Author Comment

ID: 26096009
Good idea.  Unfortunately the file server's ip address is listed in the hosts file and once connected via VPN, it is pingable by name.
LVL 43

Expert Comment

by:Steve Knight
ID: 26096246
ok, no problem was just worth throwing in since I've seen that before.  Am working on other things at the moment but sure someone else will offer better advice for you shortly.


Accepted Solution

asisson_2000 earned 0 total points
ID: 26097477
This ended up being a synchronization issue.  I noticed that if I ran this script twice, it would work.  Just to test it, I moved the "%windir%\system32\mobsync.exe /logon" line to be at the beginning of the script.  It worked just fine after that.
LVL 43

Expert Comment

by:Steve Knight
ID: 26099088
fair enough, sorry couldnt put any more thought into it earlier...

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

872 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