Linux connect to 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 .

Читайте также:  Linux check installed drivers

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.

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.

Читайте также:  Посмотреть размеры файлов linux

I hope it works. Good luck!

Источник

How to share files between a Linux and Windows computer

Computer Hope

The easiest and most reliable way to share files between a Linux and Windows computer on the same local area network is to use the Samba file-sharing protocol. All modern versions of Windows come with Samba installed, and Samba is installed by default on most distributions of Linux.

Create a shared folder on Windows

First, create a shared folder on your Windows computer.

Following the steps below, creates a shared folder on your Windows computer that lets you access files in that folder on your Linux computer. With the right permissions you can also copy, edit, and delete files in that folder from your Linux computer.

  1. Open the Control Panel.
  2. Select the Network and Sharing Options or Network and Sharing Center option.
  3. Click the Change advanced sharing settings link in the left navigation menu.
  4. Click the Turn on Network Discovery and Turn on File and Print Sharing options.
  5. Click the Save changes button at the bottom of the Advanced sharing settings window.

Now, create a new folder to share or choose an existing folder that you want to share.

  1. Right-click the folder and select Properties.
  2. Go to the Sharing tab.
  3. If you want to share the folder with another Windows account, click the Share button, add the account to grant permission to access the shared folder, and click the Share button.

If you shared the folder with another Windows account, you need to click the Advanced Sharing button, then click the Permissions button. Select the account, check the Allow box for the Change or Modify permission, and click OK.

  1. Click the Advanced Sharing button.
  2. On the Advanced Sharing window, check the box for Share this folder and click OK.
  3. The network path for the folder is now displayed above the Share button, indicating that it is now a shared folder. For example, it may look something like \\YOURCOMPUTERNAME\Users\YourUserName\ShareFolderName. Make a note of this network folder path to use later on your Linux machine.

Access a Windows shared folder from Linux using Konqueror

Many Linux distributions use the KDE desktop environment and the Konqueror file manager/browser. If you’re using this, you can follow these steps to access your Windows shared folder.

  1. Click the K menu icon.
  2. Select Internet ->Konqueror.
  3. In the Konqueror window that opens, click the Network Folders link, or type remote:/ in the address bar and press Enter .
  4. Click the Samba Shares icon.
  5. Click the icon of your Windows Home workgroup.
  6. Click the Workgroup icon.
  7. Click the icon for your computer.
  8. When prompted, enter the username and password for the Windows account that created the share.
  9. Click OK.
Читайте также:  Версию используемого ядра linux

Access a Windows shared folder from Linux using Nautilus

Many Linux distributions, especially those that use the GNOME desktop environment, use the Nautilus file manager. If you’re using this, you can follow these steps to access your Windows shared folder.

  1. Open Nautilus.
  2. From the File menu, select Connect to Server.
  3. In the Service type drop-down box, select Windows share.
  4. In the Server field, enter the name of your computer.
  5. Click Connect.

Alternatively, in the Nautilus address bar, you can type smb://ComputerName/ShareName and press Enter . For example, when you created your Windows Share if the share name was listed as:

\\YOURCOMPUTERNAME\Users\YourUserName\ShareFolderName

Type smb://YOURCOMPUTERNAME/Users/YourUserName/ShareFolderName and press Enter . Note the smb: at the beginning, in Linux, use forward slashes instead of backslashes.

Access a Windows shared folder from Linux using the command line

You can also access your Windows shared folder from the Linux command line using the smbclient program.

  1. Open a terminal.
  2. Type smbclient at the command prompt.
  3. If you receive a «Usage:» message, smbclient is installed, and you can skip to the next step. However, if the command is not found, you need to install smbclient. Follow these steps to install it.
  1. If you use the apt package manager, the default on Linux systems such as Ubuntu or Debian, you can use the sudo apt-get install smbclient command.
  2. If you use the yum package manager, the default on Linux systems, such as CentOS, you can use the sudo yum install samba-client command.
  3. You can also download the Samba client directly at www.samba.org/samba/download/, which might be useful to you if you need or want to compile the program from the source code.

Источник

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