Linux access windows shared folder

Access Windows 10 Shared Folder from Ubuntu 18.04

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?

We gone to files->Other locations in linux system and there we could see the windows network. After opening that we could see the windows system there . By clicking on the windows pc we copied the folder from its shared folder.

@Deciletech Please edit your question to add details. It helps to keep the simple Q&A style and could also bring more attention since an edited question gets bounced on the homepage.

4 Answers 4

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 the computer 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.

#======================= Global Settings ======================= [global] client use spnego = no client NTLMv2 auth = no ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP client max protocol = NT1 

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 the cifs-utils and the actual /etc/samba/smb.conf file.

$ sudo apt install smbclient 

Works on Lubuntu 18.10 as installed; no additional packages or edits required. Does not support browse by clicking. Works with entering smb://192.168.1.102 in PCManFM-Qt file manager.

Читайте также:  Parted gpt to linux

On 18.04, I have just had success with the following:

On Ubuntu: Install smbclient and add client 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 the NewUser 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 with NewUser , 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 chose Give access to. , choosing NewUser (you may want additional permissions: see the just linked to post). Under the Sharing 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 choose Change connection properties . Take note of the IPv4 near the bottom.

In Ubuntu: Finally, open a terminal on you Ubuntu machine and execute

sudo mount -t cifs -o username=NewUser //[insert IPv4 here]/shared /home/your_ubuntu_username/shared 

and provide the password for NewUser when prompted.

This mounts the shared Windows shared folder as a folder shared 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!

Источник

How to Mount a Windows Share Folder on Linux

How To Mount A Windows Share Folder On Linux Featured

Linux and Windows systems have major differences, with different file systems and protocols in use. Sharing files between them can be difficult, especially because they use two different sharing protocols. That doesn’t mean it’s impossible to mount a Windows share folder on Linux, however. Follow along below to find out how.

Share Your Windows Folder

Before you do anything, you need to ensure that Windows has been correctly set up to allow for networking file sharing.

To enable this on Windows, right-click on the network icon in the notifications area of your Windows taskbar. From here, click “Open Network & Internet Settings.”

How To Mount A Windows Share Folder On Linux Networks

Under the “Status” category, click “Sharing options.”

Windows Network Sharing Settings Menu

In your Windows sharing options menu, make sure that “Turn on network discovery” and “Turn on file and printer sharing” are enabled.

Click the radio buttons next to both options to make sure this is the case.

Windows Enable Network Sharing

Click “Save changes” to save your settings. Once this is done, open Windows File Explorer and locate the folder you’re looking to share with your Linux PC.

Читайте также:  Zabbix мониторинг оперативной памяти linux

Right-click the folder and click “Properties.”

How To Mount A Windows Share Folder On Linux Desktop Properties

In your folder properties, click the “Sharing” tab, then click “Advanced Sharing.” Click to enable the “Share this folder” checkbox, then click “Permissions.”

Windows Share Folder

Under the “Permissions” section, set the control rights for your folder. By default, Windows will grant read-only access to your files.

If you want to allow everyone to read or write to the folder, click “Allow” for the “Full Control” permissions set. Set these permissions to suit your own requirements.

Windows Folder Share Permissions

Once you’re done, click “OK” three times to close each of the dialog boxes.

Your folder should now be shared on your network, ready for you to access from your Linux PC.

Install CIFS-utils

Depending on your Linux distribution, you may be able to mount your Windows-shared folder automatically in your distribution’s file explorer.

However, this may not work correctly. The safest way to mount Windows-shared folders on Linux is to use the CIFS-utils package and mount the folder using the Linux terminal.

This allows Linux machines to access SMB file shares used by Windows PCs.

Linux Install Cifs Utils

To install CIFS-utils, open a new terminal window. For Ubuntu and Debian-based distributions, type:

sudo apt install cifs-utils

Once installed, you can then mount your Windows share folder from the Linux terminal.

Mount Windows SMB Share on Linux

You’ll need to create a mount directory before you can mount your Windows SMB-shared folder on Linux. This is where Linux will mirror the contents of your shared folder.

To do that, open a terminal window and type:

Once created, type the following:

sudo mount.cifs //Windows/SharedFolder /mnt/share -o user=account

Replace “Windows” with the IP address or hostname for your Windows PC and “SharedFolder” with your shared folder name. For the username, replace “account” with your Windows username or full Microsoft account email.

Linux Mount Folder Command

You’ll be asked to provide your Windows password before the mounting process is complete. Type this in, then click Enter. If you used the correct information, your Windows folder should now be mounted and accessible in the folder you created.

Sharing Files Between Linux and Windows in Dual Boot

Sharing files between Windows and Linux works great when you mount a shared folder between the two devices, but can you still share files with a dual boot setup? Linux and Windows have separate file systems. Linux usually uses Ext4, while Windows uses NTFS and also works with FAT32. This doesn’t mean it’s impossible to see and share files, though.

You’ll need a compatible Windows system, build 20211 or higher, and a few other resources to make it work. Don’t worry. Everything is free. This guide walks you through each step in the process, including a way to read and share files between Windows and Linux.

Frequently Asked Questions

1. Why do I get a syntax error when trying to mount a folder in Linux?

Either there’s a small error in the command in the terminal window, or you have a space in the folder name. Spaces don’t always come across correctly in the syntax. Instead of recognizing the command as the full name of the folder, the system sees two unrelated items.

Читайте также:  Недостатки linux перед windows

Avoid this by placing the name in quotes. For instance, Shared Folder would become “Shared Folder.” Of course, you can also just rename the Windows 10 folder to place the words together or have a dash between them.

2. Can I mount a shared folder if I use VirtualBox?

Yes. The process should work the same way. You can also share devices, such as USB drives.

3. Can I mount guest, network, or password protected folders?

Yes, but since you’re not using the main Windows 10 account, you will need to adjust the syntax a bit. Plus, if you’re mounting a network folder, you’ll also need the server or machine name.

While this guide applies to Ubuntu, it should work for most major Linux distros as well. It lists the syntax for different scenarios, assuming you’ve already completed all of the steps (except the final mounting) above.

4. Why do I only have read access for the shared folder?

If you want to store files in the shared folder from Linux, make sure you have full read/write access to the folder in Windows. If the Windows user account only has read permission, this is the only permission you’ll have from Linux as well. You must change your account permissions from within Windows 10. For companies, you’ll need your IT admin to make the change for you.

5. Why aren’t folder changes showing up?

If you’ve made changes to the permissions of the folder, they may not show up immediately in Linux. You’ll need to remount the folder for changes to take effect.

Use the command above to remount any shared folders. This should ensure things work as expected. If you have any random glitches, remounting typically fixes them.

Wrapping Up

Mounting Windows and Linux shared folders gives you the freedom to access your most important files, no matter the operating system. The SMB protocol is well supported on Linux, so you shouldn’t find it difficult to continue accessing your Windows files and folders once you’ve installed the CIFS-utils package.

If you’d rather use a single system, here are five of the best Linux distros for Windows users you could use.

Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.

Our latest tutorials delivered straight to your inbox

Источник

Оцените статью
Adblock
detector