Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
546 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 2000 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
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

721 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