2

I am trying to access a Windows PC on my network from Ubuntu using the command line. My goal is to retrieve a few files from that Windows box.

  • I don't have access to the Ubuntu GUI, all I can use is the command line
  • I don't have physical access to the Windows box
  • the username I have for the Windows box has Administrator rights

I have tried to use those 2 smbclient commands but both gave the same error:

smbclient //192.168.1.64/c$
smbclient //192.168.1.64/c$ -U WindowsUserName
Connection to //192.168.1.64/c$ failed (Error NT_STATUS_CONNECTION_REFUSED)

I also tried to use this answer, but got an error too:

mount -t smbfs //192.168.1.64/c$ /mnt/windows-pc -o user=WindowsUserName
mount: mount point /mnt/windows-pc does not exist
assylias
  • 160
  • 1
  • 11
  • Try to gain access to C:\ on a Windows box over the network looks suspicous, to say the least. First, C:\ is the last thing one would share, second, perhaps you should contact the PC owner, instead of breaking in. – mikewhatever Feb 26 '13 at 14:00
  • @mikewhatever I am the PC owner :-) but need to access it remotely. And the only entry point I have to the network is that ubuntu box. – assylias Feb 26 '13 at 14:02
  • In that case, you should be accessing //192.168.1.64/username, unless you've shared C:\, which is extremerly unwise. You'll need to know the username and password for an existing account. – mikewhatever Feb 26 '13 at 14:06
  • @mikewhatever Thanks - but that does not seem to work (I do have a valid username and password for the Windows machine) – assylias Feb 26 '13 at 14:17
  • @mikewhatever Alright - I feel terrible - I was using the IP address of another device :-( Using `smbclient //192.168.1.21/Users -U WindowsUserName` worked. Thanks – assylias Feb 26 '13 at 14:32

1 Answers1

2

Check that the folder windows-pc exists in /mnt

If its doesnt create it with

mkdir /mnt/windows-pc

Your C drive will need to be shared for this to work? If you want to access it why don’t your just try telnet to it? Or FTP? Are you only trying to share drives?

Thanks William

LinuxBill
  • 2,057
  • 18
  • 19