Pass unc username and password with unc path

Posted on 2011-10-09
Last Modified: 2012-08-13
Is it possible to pass the unc username and password with unc path

like how ftp and smb support this



I am trying to get a (non domain pc) service access to DFS path.

Is there another way around this? Yes I could bind the PC to the domain and run the service as a domain user but what if I was using linux ?
Question by:visualjazz
    LVL 77

    Accepted Solution

    for unc's windows uses the net use command
    net use * \\computername\sharename\volume password /user:domainname\username
    user can also be /

    Author Comment

    Don't want it as a drive map - I need to run a service.
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    where does the service reside?  

    if on your machine then you need to run that service as a user with appropriate permissions that can access the unc share
    if it is on another machine one solution is to get psexec from sysinternals
    psexec \\computername  -u username -p password program arguements
    LVL 66

    Assisted Solution

    You cannot do this with a UNC path. Even IE6 (maybe IE7?) disallowed it years ago, where you could no longer include the username/password in the URL... Closest thing is the first comment by ve3ofa, where you can authenticate using Net Use (without a drive mapping)....

    net use (insert path here) password /user:domainname\username \

    This does NOT create a mapping, only authenticates to the resource....

    LVL 66

    Expert Comment

    Im glad we could answer your question. FYI, I have requested assistance to have this thread reopened and split, as I was only trying to add on to your comment ve3ofa....

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Vista's Magnifier was a tool that could be turned on in the Ease of Access Center so that things on the screen could be seen more easily.  The Vista tool showed you a magnified view in a window of what you were pointing at with your mouse.  But the …
    Article by: Lee
    Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.   Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…
    This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
    The viewer will learn how to back up with the free utility from runtime software, DriveImageXML using Windows 7. Download DriveImageXML from Open folder where it was saved: Start installation by double clicking the install scrip…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now