Networking – Command Prompt – Accessing “Access is Denied” folder

command linenetworkingprivilegesuser-accounts

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?

Best Answer

Using command prompt:

NET USE X: \\SERVERNAME\SHARENAME PASSWORD /USER:USERNAME

OR

NET USE X: \\SERVERNAME\SHARENAME * /USER:USERNAME

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:

NET USE X: /DELETE

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

NET USE X: /DELETE