I would like to share files between Windows and Ubuntu.
In Ubuntu 16.04 LTS, I could access shared folder on a Windows machine on my local network my navigating to Other locations
in Files (Nautilus), accessing the Windows network, and browse. After upgrading to Ubuntu 18.04 LTS, this no longer works for me.
How can I get access to folder shared in Windows 10 from Ubuntu 18.04?
There was a change in both Windows 10 and Samba. Some of the details are explained here.
The browse by just clicking isn't working, but you can get there by entering the shared folder link in the address field. Use the server's
IP
address or thecomputer name
for the share. In the example I'm using the IP address of the Windows 10 server:Use Keyboard shortcut Ctrl+L to type in pathname:
Typing that in the file browser will bring up authorization prompt. Use the credentials from your Windows 10 server. This will display all the available shares. You can then click on the share you want access to.
There are two changes steps you may have to do. Set
client max protocol = NT1
for the downward compatibility in the/etc/samba/smb.conf
file. Place the entry just below the workgroup = WORKGROUP line.It should look like this:
Once you have manually accessed the desired share, you can make it easily accessible in the future by bookmarking it. You can do this with the keyboard shortcut: Ctrl+D.
You can easily rename your bookmarks to something friend and meaningful by right-clicking the name that appears in the File Browser's sidebar.
Install necessary packages:
You may have to install
smbclient
, which will ensure you have the necessary dependents such as thecifs-utils
and the actual/etc/samba/smb.conf
file.On 18.04, I have just had success with the following:
On Ubuntu: Install
smbclient
and addclient max protocol = NT1
to/etc/samba/smb.conf
as per L.D. James' answer (see this post for more info).On Windows: Create a folder in Windows to share, e.g. named
shared
. Make sure the folder is shared: I created a new user on Windows, keeping theNewUser
name and selected a simple password (I first tried changing the name, but found that change was apparently only skin deep. Perhaps if I had rebooted...). I logged in withNewUser
, then logged back in with my admin account. I activated network sharing on my private network and for the folder specifically (see e.g. this post). Then I right clicked the folder and choseGive access to...
, choosingNewUser
(you may want additional permissions: see the just linked to post). Under theSharing
tab, the folder now has a network path://COMPUTERNAME/shared
.Still on Windows: To gain access to the shared folder, I used the IP of the Windows machine instead of the
COMPUTERNAME
, cf. this.To find the IP of your Windows machine, right click the network logo, open
Network and Sharing Settings
and chooseChange connection properties
. Take note of the IPv4 near the bottom.In Ubuntu: Finally, open a terminal on you Ubuntu machine and execute
and provide the password for
NewUser
when prompted.This mounts the shared Windows
shared
folder as a foldershared
in your Ubuntu user's home directory.The command is based on suggestions from here, where there are also suggestions for storing login credentials.
I hope it works. Good luck!
I too have had the same issue. Some installations do not download/install cifs-utils by default, even though samba is installed. Here is my smb.conf (relevant sections only)
Here is another reference to assist others https://linuxize.com/post/how-to-install-and-configure-samba-on-ubuntu-18-04/
Another option is to enable smb1 on Windows 10: Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol
and set simple password on Windows user.