Pass unc username and password with unc path

Posted on 2011-10-09
Medium Priority
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
  • 2
  • 2
LVL 84

Accepted Solution

David Johnson, CD, MVP earned 1000 total points
ID: 36940075
for unc's windows uses the net use command
net use * \\computername\sharename\volume password /user:domainname\username
user can also be /user:username@destination.com

Author Comment

ID: 36940088
Don't want it as a drive map - I need to run a service.
LVL 84

Expert Comment

by:David Johnson, CD, MVP
ID: 36940144
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

johnb6767 earned 1000 total points
ID: 36943754
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

ID: 36948847
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....

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Suggested Courses

864 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