1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I insert a user name in a UNC file path?

Discussion in 'Windows XP' started by ToddAndMargo, Apr 23, 2010.

  1. ToddAndMargo

    ToddAndMargo Flightless Bird

    Hi All,

    I have a customer with a mixed Linux XP network. When
    I go to administer things on the server, with Linux I can
    state the user name in the path:

    smb://foo@server/drivers

    I will be asked for the password for foo and happy
    camping starts. This is really useful for adding
    things to private shares.

    Question: in Windows Explorer (not Internet Explorer),
    is there a way to do this with XP? How do I stick
    the username into the UNC path?

    Many thanks,
    -T
     
  2. On 4/23/2010 2:09 PM, ToddAndMargo wrote:
    > Hi All,
    >
    > I have a customer with a mixed Linux XP network. When
    > I go to administer things on the server, with Linux I can
    > state the user name in the path:
    >
    > smb://foo@server/drivers
    >
    > I will be asked for the password for foo and happy
    > camping starts. This is really useful for adding
    > things to private shares.
    >
    > Question: in Windows Explorer (not Internet Explorer),
    > is there a way to do this with XP? How do I stick
    > the username into the UNC path?
    >
    > Many thanks,
    > -T


    I'm not sure if there is an equivalent in windows, but I can tell you to
    drop to a command prompt in windows and read the help for the net use
    command (net use /?) and see if that will help you.

    --
    Sorry, iPad - iPass. I want a real keyboard, with real apps, real
    multitasking, real freedom, and real choice.
     
  3. John Wunderlich

    John Wunderlich Flightless Bird

    ToddAndMargo <ToddAndMargo@invalid.com> wrote in
    news:-OXGFFix4KHA.5848@TK2MSFTNGP06.phx.gbl:

    > Hi All,
    >
    > I have a customer with a mixed Linux XP network. When
    > I go to administer things on the server, with Linux I can
    > state the user name in the path:
    >
    > smb://foo@server/drivers
    >
    > I will be asked for the password for foo and happy
    > camping starts. This is really useful for adding
    > things to private shares.
    >
    > Question: in Windows Explorer (not Internet Explorer),
    > is there a way to do this with XP? How do I stick
    > the username into the UNC path?
    >
    > Many thanks,
    > -T


    To my knowledge, you can only specify a user with the command line "net
    user" command. Try placing the following two lines into a '.bat' file
    and double-click on it.

    net use \\server\share /user:username
    explorer \\server\share

    Where you replace "server" with your server name, "share" with the
    share name, and "username" with your username.

    HTH,
    John
     
  4. ToddAndMargo

    ToddAndMargo Flightless Bird

    On 04/23/2010 01:20 PM, The poster formerly known as 'The Poster
    Formerly Known as Nina DiBoy' wrote:
    > On 4/23/2010 2:09 PM, ToddAndMargo wrote:
    >> Hi All,
    >>
    >> I have a customer with a mixed Linux XP network. When
    >> I go to administer things on the server, with Linux I can
    >> state the user name in the path:
    >>
    >> smb://foo@server/drivers
    >>
    >> I will be asked for the password for foo and happy
    >> camping starts. This is really useful for adding
    >> things to private shares.
    >>
    >> Question: in Windows Explorer (not Internet Explorer),
    >> is there a way to do this with XP? How do I stick
    >> the username into the UNC path?
    >>
    >> Many thanks,
    >> -T

    >
    > I'm not sure if there is an equivalent in windows, but I can tell you to
    > drop to a command prompt in windows and read the help for the net use
    > command (net use /?) and see if that will help you.
    >


    Thank you.

    Once "Net Use" has a user name, it sticks with it. I do not
    get to mix and match. I also wanted to surf the various shares
    with the UNC and be able to pick which user name I browser which
    shares with. This is really easy to do with Linux. I was
    hoping XP had an equivalent.

    -T
     
  5. ToddAndMargo

    ToddAndMargo Flightless Bird

    On 04/23/2010 01:33 PM, John Wunderlich wrote:
    > ToddAndMargo<ToddAndMargo@invalid.com> wrote in
    > news:-OXGFFix4KHA.5848@TK2MSFTNGP06.phx.gbl:
    >
    >> Hi All,
    >>
    >> I have a customer with a mixed Linux XP network. When
    >> I go to administer things on the server, with Linux I can
    >> state the user name in the path:
    >>
    >> smb://foo@server/drivers
    >>
    >> I will be asked for the password for foo and happy
    >> camping starts. This is really useful for adding
    >> things to private shares.
    >>
    >> Question: in Windows Explorer (not Internet Explorer),
    >> is there a way to do this with XP? How do I stick
    >> the username into the UNC path?
    >>
    >> Many thanks,
    >> -T

    >
    > To my knowledge, you can only specify a user with the command line "net
    > user" command. Try placing the following two lines into a '.bat' file
    > and double-click on it.
    >
    > net use \\server\share /user:username
    > explorer \\server\share
    >
    > Where you replace "server" with your server name, "share" with the
    > share name, and "username" with your username.
    >


    Rats!

    Thank you for the response.

    -T
     
  6. John Wunderlich

    John Wunderlich Flightless Bird

    ToddAndMargo <ToddAndMargo@invalid.com> wrote in news:
    #iwUxSy4KHA.5548@TK2MSFTNGP04.phx.gbl:

    > Once "Net Use" has a user name, it sticks with it. I do not
    > get to mix and match. I also wanted to surf the various shares
    > with the UNC and be able to pick which user name I browser which
    > shares with. This is really easy to do with Linux. I was
    > hoping XP had an equivalent.
    >


    It's not just "net use". Windows *by design* will only allow one
    authentication per connected server. If you connect to a share using
    one authentication -- no matter how you do it -- you cannot connect
    to a different share on that same server using a different
    authentication until/unless you disconnect the first connection. You
    will either have to do a "net use [...] /delete", right-click on "My
    Network Places" and choose "Disconnect Network Drive" (even if not
    mapped), or wait until the non-mapped idle connection times out (~15
    min).

    Quoting from "INFO: WNetAddConnection2 and Multiple User Credentials"
    <http://support.microsoft.com/kb/183366/>

    <quote>
    "In Windows NT, on the other hand, you can use the API with multiple
    sets of user credentials. However, one major limitation applies,
    namely, that connections to a given server or its shared resources
    have to be made within the context of a single set of credentials. "
    </quote>

    Score 1 for Linux.

    HTH,
    John
     
  7. ToddAndMargo

    ToddAndMargo Flightless Bird

    On 04/23/2010 09:07 PM, John Wunderlich wrote:
    > ToddAndMargo<ToddAndMargo@invalid.com> wrote in news:
    > #iwUxSy4KHA.5548@TK2MSFTNGP04.phx.gbl:
    >
    >> Once "Net Use" has a user name, it sticks with it. I do not
    >> get to mix and match. I also wanted to surf the various shares
    >> with the UNC and be able to pick which user name I browser which
    >> shares with. This is really easy to do with Linux. I was
    >> hoping XP had an equivalent.
    >>

    >
    > It's not just "net use". Windows *by design* will only allow one
    > authentication per connected server. If you connect to a share using
    > one authentication -- no matter how you do it -- you cannot connect
    > to a different share on that same server using a different
    > authentication until/unless you disconnect the first connection. You
    > will either have to do a "net use [...] /delete", right-click on "My
    > Network Places" and choose "Disconnect Network Drive" (even if not
    > mapped), or wait until the non-mapped idle connection times out (~15
    > min).
    >
    > Quoting from "INFO: WNetAddConnection2 and Multiple User Credentials"
    > <http://support.microsoft.com/kb/183366/>
    >
    > <quote>
    > "In Windows NT, on the other hand, you can use the API with multiple
    > sets of user credentials. However, one major limitation applies,
    > namely, that connections to a given server or its shared resources
    > have to be made within the context of a single set of credentials. "
    > </quote>
    >
    > Score 1 for Linux.
    >
    > HTH,
    > John



    Hi John,

    Thank you for the scholarly explanation. You are an excellent
    technical writer. I was hoping I was just ignorant and could
    actually do what I wanted.

    Since I live in both the Linux and Windows world (sometimes
    Apple too), I am always finding things in one I would like to
    see in the other. And, sometimes, I think my head is
    going to explode. :'(

    -T
     

Share This Page