Heterogeneous networks are common now. Those networks include computers with Windows and Unix Operation Systems (OS). Exchange files between those Operation Systems is a trivial task. It can be done with command line interface (CLI) or Graphic User Interface (GUI). Both methods give the same results but it depends on usage, user technical level, and so on which method is suitable.
Access with CLI
Install Samba client and other related libraries on your Linux computer.
sudo yum -y install samba-client samba-common cifs-utils
Create mount point.
sudo mkdir -p /mnt/F_drive
Check connection to Windows server.
smbclient -L //window_server -U user_name
Access Windows shared folder.
sudo mount.cifs //window_server/F_shared_drive /mnt/F_drive -o rw,username=user,file_mode=0777,dir_mode=0777
- rw - read write access
- ro - read only access
- file_mode=0777,dir_mode=0777 - Linux access to shared folder. The sample grants full access to everybody.
Invalid argument error
mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Possible issue is missing shared folder in UNC:
Device or resource busy error
mount error(16): Device or resource busy Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Possible issue is that your mount is used. You need to unmount your mount point, for example,
sudo umount /mnt/F_drive
Could not resolve address error
mount error: could not resolve address for window_server: Unknown error
Possible issue is shared folder computer name. You need to replace name with IP address, for example, replace
Access with GUI
Files is a default file manager in GNOME desktop and it has embedded Samba client.
Open Files, go to Other Locations, and type in your shared folder path, for example,
Fill out connection form.
Unable to access location. Failed to retrieve share list from server: No such file or directory error.
There are 2 possible reasons.
Address can not be resolved and you need to use IP address rather than computer name, for example,
It is used the SMB version 1.0 protocol in Files file manager. You might need to try one of the options below.
a) Update your Linux computer.
sudo yum update
b) Downgrade SMB protocol to version 1.0 in your Windows server.
Open Windows Explorer and key in
Control Panel\Programsin address bar
Go to Turn Windows features on or off
Check SMB 1.0/CIFS Server setting
Unable to access location. Failed to mount Windows share: Connection time out error.
Enable file in printer sharing in Windows 10. Open Advanced sharing settings form typing
Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settingsin Windows Explorer address bar.
Commentscomments powered by Disqus