Note: I'm on a Windows computer using command prompt.

A network exists where there is a single drive (let's call it C:) and there is a folder for every different user account inside of this drive. For example, a few directories might be C:\John, C:\Steve, and C:\Bob. I am logged into the Bob account on the network (I logged into it from the initial log-in page when the computer is turned on). When I navigate to the C: drive in command prompt and attempt to use the command: cd John, Access is Denied is returned. If I had John's username and password for the network, is there a way I could use a command (like: cd John [username] [password]) or something like that? Or would I need to log off my current account, log into the computer with the John information and then navigate to the directory to view the folder?

  • If this was on a single machine, I would say that you could run Command Prompt using UAC with John's account if John's account had elevated privileges, but I'm unfamiliar with how exactly this works in network settings. If it's a network drive, you could also map it using John's credentials instead of Bob's. Other than that, I don't have much of an idea. – Pockets May 3 '14 at 2:50

Using command prompt:




Will prompt for password and will not show it when you type it

Drive X: will be mapped to the shared folder SHARENAME in SERVERNAME

When you are done:


If the network folder is already mapped by you, unmap it first:

  • If the drive is already mapped by gpo this may have issues. you may have to run some complex runas/cmd trickery to get a cmd prompt to work for the stated purpose. I dont have any of the cmd info with me but can provide if needed – Kendrick May 3 '14 at 4:20
  • If the resource is already mapped, it can be unmapped first, edited the answer to account for it. – Carlos Alloatti May 5 '14 at 13:50

Couple suggestions to open a command prompt as John:

Ctrl+Shift+Right-click a command prompt shortcut, choose "Run as different user", and then provide John's credentials.


Use runas /user:domainname\John cmd, then enter John's password when prompted.


Use PSexec:

psexec /u domainname\john cmd, then enter John's password when prompted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.