networking - Command Prompt - Accessing "Access is Denied" folder
2014-07
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?
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
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.
or
Use runas /user:domainname\John cmd
, then enter John's password when prompted.
or
Use PSexec:
psexec /u domainname\john cmd
, then enter John's password when prompted.
I have the opposite problem compared to the author of this question:
Hard drive access denied from Windows Explorer (but works from command prompt as Admin)
I can see all the drive letters for a particular server in Windows Explorer, and can navigate through them exactly as would be expected. The drive letters are displayed in Explorer in parens to the right of the path info --
finalpathportion (\\server\otherpathportions) (driveletter:)
e.g.
jmerrill (\\server\users) (H:)
But the drive letters are not usable in a "Run as Administrator" command prompt. They have worked in the past, but I have since rebooted. I thought that perhaps I had to start a new command prompt having visited them in Explorer -- but that did not help. "net use" in the command prompt shows
Unavailable H: \\server\users\jmerrill Microsoft Windows Network
with similar info for the other drives. I can do
net use h: /d
net use h: \\server\users\jmerrill
for each drive, and get the letters to be available in the command prompt. It is perhaps obvious that I don't think that it should be necessary to do that.
Does anyone have any ideas?
Start Explorer as an Administrator and navigate there once.