Solved

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

Posted on 2011-02-24
6
527 Views
Last Modified: 2012-05-11

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.

0
Comment
Question by:fcek
[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
  • 3
  • 3
6 Comments
 
LVL 8

Accepted Solution

by:
pwust earned 500 total points
ID: 34973671
It is as easy as write the line:
start \\192.168.1.100\mary

Open in new window

into the batch file, which will usually work like if you had written it to the "Run..." prompt.

I hope that solves your issue...
-Patric
0
 

Author Comment

by:fcek
ID: 34975593

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
0
 

Author Comment

by:fcek
ID: 35216684


The answer to that second question was just to log off/on.
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 8

Expert Comment

by:pwust
ID: 35229494
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...

0
 

Author Comment

by:fcek
ID: 35235497


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?

0
 
LVL 8

Expert Comment

by:pwust
ID: 35240931
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
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

733 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