opening explorer in network share from un-authenticated account...

K

Kyle

OK, so I have a network share (my c: drive) which has been
set to ONLY be accessible with a single (Active Directory)
username/password account. I have even deleted the C$
default share, because I didn't want anonymous connections
(even reading) to the system (confidential company
information). This is my computer in my office on the
network.

So, say I am helping a user in another building, who is
logged in and authenticated through the network on their
own account. Their account SHOULD NOT have access to my C:
Drive. It does not, because if I type:

\\mycomp\mycdrive

into the "Run" window, it says "Access is Denied!".

However, if I am on their computer, I would like to have a
straightforward command-line formatted way of connecting
to my share using my own credentials.

If I log in with my account to that person's computer, I
can type:

\\mycomp\mycdrive (or could manually do it with
explorer.exe \\mycomp\mycdrive)

into the "Run" command window, and it opens up explorer to
that share with no problems (since it used the default
credentials of the current logged in user, which is that
same network account I specified had access to the share).

Problem is, I don't want to have to log off of their
account, and into mine, just to access my share. I want to
be able to access the share with specified credentials.

So, I naturally figured the RUNAS service would accomplish
this. First, I verified the runas service was running and
working, because I was able to run other network commands
that only my network account would have credentials for.

So, I figured this could be used to start explorer into my
network share with manually specified credentials, by
doing:

runas /user:myuser@mydomain "explorer.exe
\\mycomp\mycdrive"

I also tried the alternative format of

runas /user:mydomain\myuser "explorer.exe
\\mycomp\mycdrive"

Since this is what runas is supposed to do, allow you to
run a command with different credentials than the default
current logged in account.

I immediately get prompted for the password, which is
correct. I input that, and the prompt reports it
is "Attempting to start "explorer.exe \\mycomp\mycdrive"
AS "myuser@mydomain". It waits for about 15 seconds, then
it just finishes and goes back to the command prompt.

No error, no problems reported, but still no explorer is
launched. I verified that errors in authentication WOULD
be by default reported, by purposely trying the command
with incorrect credentials, and sure enough, the error
reported back is "Access is denied".

So, it appears to be authenticating correctly. And it
looks like it is trying to execute the command and does so
without error. But then it just stops. What is up with
that?

I do NOT want to try to use "net use" or anything like
that to map a drive (even temporarily) because its too
roundabout. I want a single straightforward command to
open up explorer in a network share with manually
specified credentials, how do i do so?? any ideas?
 
H

Herb Martin

net use * \\yourMachine\yourShare * /user:YourDomainOrServer\yourUserAccount

The first "*" picks a drive letter and the second one "asks for your account
password."
 
M

Marty List

You don't have to pass a drive letter to the NET USE command, just leave it
out, like this:

net use \\mycomp\mycdrive /user:[email protected] password
net use \\mycomp\mycdrive /user:mydomain\myuser password

or if you don't want your password visible, try this:


net use \\mycomp\mycdrive /user:[email protected] *


The syntax is displayed with either of these commands:

net use /?
net help use

By the way, I would refer to this as a "deviceless connection", rather than
an "anonymous connection" which implies anonymous security credentials.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top