SSH

Accessing Network Shares Using Another User's Account

Example: John Brown forgot to copy his test results from the folder belonging to the test account he uses for testing. It is on \\server3\test_share and the only user that has access to the file is testuser. It is possible to access the file from the user's own terminal logon session on SSH jump server:

C:\Users\johnb>net use \\server3\test_share <testuser's password here> /USER:testuser
The command completed successfully.


C:\Users\johnb>dir \\server3\test_share
 Volume in drive \\server3\test_share has no label.
 Volume Serial Number is 1D01-2B83

 Directory of \\server3\test_share

13.12.2011  17:15    <DIR>          .
13.12.2011  17:15    <DIR>          .. 
02.04.2009  10:15             8 192 test_results.txt

However, it will only work if John logs on to the SSH jump server using his credentials (user name and password).

An alternative way to access the file would be to log on to SSH jump server as testuser using his credentials and just type:

C:\Users\testuser>net use \\server3\test_share

The command completed successfully.

C:\Users\testuser>dir \\server3\test_share
 Volume in drive \\server3\test_share has no label.
 Volume Serial Number is 1D01-2B83

 Directory of \\server3\test_share

13.12.2011  17:15    <DIR>          .
13.12.2011  17:15    <DIR>          .. 
02.04.2009  10:15             8 192 test_results.txt