Map network drive, connect as different user to same Server



Author: TonyLawrence
Date: Tue Feb 22 23:04:52 2005
Subject: Map network drive, connect as different user to same Server

I ran into an interesting problem today. I was helping someone configure Samba and had shown him the XP/2000 trick of mapping a network drive and having it connect as a different user. He then wanted to map another network drive to another share on the same server, but this time connect as an entirely different user.

Windows won't do that. You can't use different credentials to connect to different shares on the same server. Once you provide a username and password for an smb server, Windows XP/2K wants to use that for ALL shares on that server.

That's actually a useful feature. For example, I use that to connect printers that otherwise would need authentication. By mapping a share that reconnects at logon, the printers are automatically available because attempting to connect to them will automatically use the same logon/password as the mapped drive did.

But darn it, this person really needed to connect multiple times with different user ids. After some digging, we figured out how to do it: fool Windows into thinking it isn't the same server. One way to do that is to use the ip address for one connection and the smb name for the other, but that only gives you two connections. To get more, you need to add aliases into DNS and configure Samba with the same netbios aliases. With that trick, Windows happily makes multiple connections with different user name/password logons. Basically, it doesn't realize that it is connecting to the same machine.

See http://www.cramsession.com/articles/get-article.asp?aid=294 for an explanation of how Windows decides what credentials to use.



Comments /Forum/TonyLawrence2.html


Wed Nov 1 12:04:03 2006: Subject:   anonymous
Thanks for the clue: it does work. But then you have to reenter the password when you want to access the drive for each new session (or I made something wrong in the initial mapping).



Tue Nov 21 04:25:33 2006: Subject:   anonymous
Whats a computer?



Tue Mar 6 08:12:22 2007: Subject:   anonymous
Yes, when you log off the computer. You open the network drive you have to reenter the password. Do you have another way to not reenter the password ?



Fri May 18 19:40:36 2007: Subject:   anonymous
Great information! This was exactly what I was looking for. Thanks for figuring this out.



Sat Aug 11 21:11:17 2007: Subject:   anonymous
Great hint, the workaround works well.


If only all posts in forums were so competent.
Can't understand why Windows behaves so silly.
Thanks.

Mon Aug 13 14:58:38 2007: Subject:   BigDumbDinosaur
Can't understand why Windows behaves so silly.

Don't feel too bad. Microsoft doesn't understand it either. <Grin>



Tue May 13 14:49:06 2008: Subject:   anonymous


has ms blocked this workaround I can not get it to map even when using the ip for one and the servername for the other



M3IP inc.



Tue May 13 15:24:48 2008: Subject:   TonyLawrence


"has ms blocked this workaround"

I believe Vista works differently and this won't do the trick.

Wed May 14 07:16:09 2008: Subject:   anonymous


the wrokaround is not working on xpsp3 get the error when refering to the saem server by ip and servername

Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
612431828,247 45,201

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Networking
       - Forum
       - Windows




Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://bcstechnology.net Full service Linux & UNIX systems integrator; Windows to UNIX/Linux Client-Server Specialist; Secure E-Mail & Website Hosting; Thoroughbred Software Developer; Custom Industrial Automation; Hardware & Electronics Experts; In Business Since 1985.


http://www.schewanick.com SCO Unix, Solaris, Linx (various), PHP, MySQL, Apache, uniBasic, dL4, Perl, System Administration and more....


http://www.m3ipinc.com Security, firewalls, ids, audits, vulnerability assesments, BS7799, HIPAA, GLB, incident handling




Twitter
  • Jun 26 21:28
    Lost 5 cents at poker tonight. Hard to do with 10 and 20 cent betting..
  • Jun 23 07:01
    Hypermiling:









Change Congress

Related Posts