Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to access shared folder on Windows from Ubuntu machine
#1
Hello,
How to access the conetnt of a shared folder on Windows from Ubuntu machine ?
Transfer isn't need, only read acces and probably file rename.
Thanks.
Quote
#2
I haven't done this for a long time but it seems to me that you install samba and there is a command to mount the folder.

Looking in some very old notes, I have a command line to mount the shared C folder from host 192.168.2.4

Output:
sudo mount -t cifs 192.168.2.4:C -o password="" /mnt/foobar
You need to create the folder /mnt/foobar first.
Quote
#3
Yes, I installed it.
What then ?
I've tried to mount shared folder using IP address of windows machine, but it failed.
Quote
#4
see my edit above. You can have the ip address of host foobar by entering
Output:
nmblookup foobar
or perhaps from python
>>> import socket
>>> socket.gethostbyaddr('foobar')
Also make sure package cifs-utils is installed and you can read
Output:
man mount.cifs
Quote
#5
(Nov-09-2019, 02:57 PM)Gribouillis Wrote: I haven't done this for a long time but it seems to me that you install samba and there is a command to mount the folder.

Looking in some very old notes, I have a command line to mount the shared C folder from host 192.168.2.4

Output:
sudo mount -t cifs 192.168.2.4:C -o password="" /mnt/foobar
You need to create the folder /mnt/foobar first.
Here is output when I execute the instruction above:

mount.cifs: bad UNC (192.168.0.1:C)

where 192.168.0.1 - is wired IP of Windows machine
Quote
#6
What is the path of the shared folder on the windows host?

also you may need username="ham",password="eggs" after the -o
Quote
#7
\\SARATOGA\pdf2

Tried with password and username. The same.
Probably I should also specify the path to shared folder, i.e. \\SARATOGA\pdf2 ?
Quote
#8
Then try 192.168.0.1:SARATOGA/pdf2 or something similar. There must be a correct syntax to name the volume.

It is essential that you specify the path of the shared folder. In my example the shared folder was the whole C drive, hence the C.
Quote
#9
Tried as you suggested with two version of slash, i.e. '\' and '/'.
The same.

I checked Windows machine from Ubuntu with ping and it's Ok.
Quote
#10
Isn't SARATOGA a subfolder of a windows volume such as C: or E: ? You probably need to include the name of the volume in the path.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  [Python3.X] [Windows] Remote Registry Access (like WMI or other) ManuHry 1 959 Jun-19-2018, 03:27 PM
Last Post: Larz60+
  paramiko/ssh-matic not working from Windows Server 2012 R2 machine having Python34. pythonuser14 1 1,328 Oct-15-2017, 06:53 AM
Last Post: pythonuser14

Forum Jump:


Users browsing this thread: 1 Guest(s)