Posts: 215
Threads: 55
Joined: Sep 2019
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.
Posts: 4,783
Threads: 76
Joined: Jan 2018
Nov-09-2019, 02:57 PM
(This post was last modified: Nov-09-2019, 03:04 PM by Gribouillis.)
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.
Posts: 215
Threads: 55
Joined: Sep 2019
Yes, I installed it.
What then ?
I've tried to mount shared folder using IP address of windows machine, but it failed.
Posts: 4,783
Threads: 76
Joined: Jan 2018
Nov-09-2019, 03:16 PM
(This post was last modified: Nov-09-2019, 03:16 PM by Gribouillis.)
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
Posts: 215
Threads: 55
Joined: Sep 2019
(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
Posts: 4,783
Threads: 76
Joined: Jan 2018
Nov-09-2019, 03:21 PM
(This post was last modified: Nov-09-2019, 03:22 PM by Gribouillis.)
What is the path of the shared folder on the windows host?
also you may need username="ham",password="eggs" after the -o
Posts: 215
Threads: 55
Joined: Sep 2019
Nov-09-2019, 03:22 PM
(This post was last modified: Nov-09-2019, 03:26 PM by Pavel_47.)
\\SARATOGA\pdf2
Tried with password and username. The same.
Probably I should also specify the path to shared folder, i.e. \\SARATOGA\pdf2 ?
Posts: 4,783
Threads: 76
Joined: Jan 2018
Nov-09-2019, 03:27 PM
(This post was last modified: Nov-09-2019, 03:27 PM by Gribouillis.)
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.
Posts: 215
Threads: 55
Joined: Sep 2019
Nov-09-2019, 03:30 PM
(This post was last modified: Nov-09-2019, 03:33 PM by Pavel_47.)
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.
Posts: 4,783
Threads: 76
Joined: Jan 2018
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.
|