Link to home
Start Free TrialLog in
Avatar of fcek
fcekFlag for Ireland

asked on

To set up a link / batch file for each user to log onto a NAS. User to be prompted for password.


Goal - to set up links / batch files for each user to

e.g.
On our NAS 192.168.1.100
There are two users
mary (share) mary1 (password)

The users are not technical.

Whats the best way to give them a "link"
I want each user to be presented with a password fileld.

I can do it it from
start
run
\\192.168.1.100\mary

Can someone write a batch file to make that run and I will create a batch file for each user.

Thanks.

ASKER CERTIFIED SOLUTION
Avatar of pwust
pwust
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fcek

ASKER


pwust: > that worked :-)


If I swap to login into the NAS with another user I get the following > Please see pic attached.
I can log on/off to clear this error.

Is there something I can do appart from log off / on?
Is there a batch file I could run ?  


network-error-.gif
Avatar of fcek

ASKER



The answer to that second question was just to log off/on.
The error you have showed comed if you perform fast user switching.
e.g. you are connected as USER1 to your NAS, then perform a "switch user" to USER2 on the same client PC.
If USER2 tries to connect to you NAS, the client tries to open a second connection with different user credentials, although the connection is active in the other (USER1-) session.

One solution is logging of and on (as you found out).

If you really need to have multiple connections from one PC to a network resource such as NAS, using different credentials, then you need to fool Windows by using different DNS host names that are all pointing to the same NAS.

this could be:
NAS-FOR-USER1 -> IP of your NAS
NAS-FOR-USER2 -> same IP of your NAS

so USER1 will use "start NAS-FOR-USER1\USER1",
and USER2 will use "start NAS-FOR-USER2\USER2"

this will work, but I see no real use out of that...

Avatar of fcek

ASKER



Hi please explain that using these .


IP address 192.168.1.100

User:                    share:

user1                   share1
user2                   share2

How do you do it without logging in/out?

You will first will need to add DNS alias entries for your destination ip 192.168.1.100.

e.g.
my-nas.domain.tld.         3600     IN     A       192.168.1.100
my-nas-user1.domain.tld.   3600     IN     CNAME   my-nas.domain.tld.
my-nas-user2.domain.tld.   3600     IN     CNAME   my-nas.domain.tld.

Open in new window

or:
my-nas-user1.domain.tld.   3600     IN     A       192.168.1.100
my-nas-user2.domain.tld.   3600     IN     A       192.168.1.100

Open in new window

then:

If you do not have a DNS server, you can add two lines to your local computer's
hosts file (usually c:\Windows\System32\drivers\etc\hosts):
my-nas-user1          192.168.1.100
my-nas-user2          192.168.1.100

Open in new window

or:
my-nas-user1.domain.tld       192.168.1.100
my-nas-user2.domain.tld       192.168.1.100

Open in new window


script of user1:
start \\my-nas-user1.domain.tld\share1
or:
start \\my-nas-user1\share1

Open in new window

script for user2:
start \\my-nas-user2.domain.tld\share2
or:
start \\my-nas-user2\share2

Open in new window


The clue is that Windows now thinks that your NAS is two different devices because you use names instead of the IP addresss.

HTH, Patric