User Tools

Site Tools


linux:debian:access_windows_samba_share

How to Access Windows Shares from Debian (jessie)

Let me just note that I am not a Linux expert. Since I mostly use Xfce desktop on Debian, I sometimes have problems which are not valid for other Linux users. For example, Debian (jessie) with Xfce desktop does not come with samba packages preinstalled which allows to access windows shares or share folders for windows users. Finally I figured out how to do it and I write the instructions here for others like me. I have uninstalled every packages related to my samba experiment and I installed following packages.

aptitude install samba samba-client samba-vfs-modules winbind cifs-utils gigolo gvfs gvfs-bin gvfs-backends 

The package gigolo is to manage/connect/mount remote filesystems and is a part of Xfce goodies project. gigolo will allow us to connect to windows shares. After installing required packages run gigolo from shell or from menu and create a new connection like below with approriate inputs.

Then you can connect to windows share from thunar. It is nice and easy.

If you would like to have a desktop shortcut, you need to create a launcher. Right click on the desktop and press Create Launcher… menu and create a launcher like this;

When you save this launcher, you can access your share from desktop by double click.

However, if you want to edit files from share by clicking and editing them, you cannot do this with this method ( I don't know why). I mounted this share to my desktop to overcome this. From shell as root, create a folder on desktop and mount the samba share on this folder with correct username and password.

mount -t cifs //192.168.1.3/share /root/Desktop/SERVER -o username=<username>,workgroup=<WORKGROUP>
# unmounting is simply;
# umount /root/Desktop/SERVER

What if you want to make this mount permanent, then you can add this entry below to /etc/fstab. Do not forget to change username, password, mount folder and target share, etc.

//192.168.1.3/share /root/Desktop/SERVER cifs username=<username>,workgroup=<WORKGROUP>,password=<password>,file_mode=0777,dir_mode=0777,noperm

The options file_mode=0777,dir_mode=0777,noperm is to give write access to other users if you mount it to a place where non-root users can access. You can omit them if you like. Check options with man mount.cifs.

Let me know if anything is missing or incorrect.

Discussion

Enter your comment. Wiki syntax is allowed:
 
linux/debian/access_windows_samba_share.txt · Last modified: 2016/11/17 08:34 by ozan