Friday, February 18, 2011

Mount Windows Shares in Arch Linux using fstab

Mounting a windows share at runtime is very easy and straight forward. But mounting a windows share with read/write permission without a user or password can be quiet tricky.
First you need to install some components:
pacman -S smbclient
pacman -S gamin
pacman -S smbnetfs
modprobe fuse

Add the following lines to your /etc/rc.conf
MODULES=(... fuse ...)
DAEMONS=(... smbnetfs ...)

And write this line inside your /etc/fstab
//servername/sharedFolder  /home/user/share  cifs  guest,uid=1000,iocharset=utf8,codepage=unicode,unicode  0  0

guest: means there are no login credentials requierd to access this share
uid=1000: this must be your user id. With this option you get additional write access
the combination iocharset=utf8,codepage=unicode,unicode allows access to files with names in non-English languages

No comments:

Post a Comment