Solved

Map network drive without username and password

Posted on 2008-10-28
5
1,886 Views
Last Modified: 2013-12-02
I want to create a login script on Windows Server 2003 which maps a network drive to each user workstation as the user logs into the machine.

The path to the share I want to mount is \\<server-ip-address>\alfresco

and the contents on the mapped drive changes according to the username and password provided to the remote server for authentication.  The usernames and passwords for the remote server are different to those for the workstation login against Active Directory.

How can I map the network share as a placeholder for each user?  I want the drive to be mounted for each user by the login script and then for them to provide the appropriate username and password to it when they first access it (i.e. via a dialog box which comes up when they first double click the drive in My Computer).

Is this possible?  Alternatively, can I use /persistent in the net use command on the login script to mount the drive and have the user name and password remembered for that user permanently once they have entered it once?

Many thanks for any help.
0
Comment
Question by:evbuk
[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
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:szaibot
ID: 22823193
You might want to do something like it.
You will need file IFMEMBER.exe from here
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en


---LOGIN SCRIPT FILE---

                     SET OUTFILE=

echo.# SYNCHRONISING TIME TO BHS DOMAIN #

:TIME
NET TIME /DOMAIN:DIRECTORSSECRET /SET /YES

IFMEMBER "yourdomain\securitygroup1"
      IF NOT ERRORLEVEL 1 GOTO NO_SHARE1
      IF EXIST Z:\*.* NET USE Z: /D %OUTFILE%
      NET USE Z: \\server\share1 /PERSISTENT:NO %OUTFILE%
:NO_SHARE1


IFMEMBER "yourdomain\securitygroup2"
      IF NOT ERRORLEVEL 1 GOTO NO_SHARE2
      IF EXIST s:\*.* NET USE s: /D %OUTFILE%
      NET USE s: \\server\share2 /PERSISTENT:NO %OUTFILE%

:NO_SHARE2


IFMEMBER "yourdomain\securitygroup3"
      IF NOT ERRORLEVEL 1 GOTO NO_SHARE3
      IF EXIST P:\*.* NET USE P: /D %OUTFILE%
      NET USE P: \\server\share3 /PERSISTENT:NO %OUTFILE%

:NO_SHARE3

goto exit

:EXIT
0
 
LVL 2

Expert Comment

by:szaibot
ID: 22823218
Not exactly sure if that helps you, as I see the logins are different on workstations and server.
0
 

Author Comment

by:evbuk
ID: 22823337
Thanks for the reply, but as you say, it doesn't help.
This is an authentication against a remote server, not part of the current Active Directory.
0
 
LVL 10

Accepted Solution

by:
fm250 earned 500 total points
ID: 22823460
why don't you add the remote server as member domain and save time -if it is yours-.
You can also put a script that include the username and password to map the remote share on the start up for each user.  
0
 

Author Comment

by:evbuk
ID: 22823842
I like the above idea but I connect to the server through a VPN at the moment which I don't think will work with adding to the Active Directory domain.

Is there a way to store a different user name and password for a user in Active Directory - perhaps with a variable - so that I could specify the password for the remote server for each user in their AD profile and pull this into the login script?
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Determining the an SCCM package name from the Package ID
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

635 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