Windows shares can be mounted using cifs
option:
mount -t cifs -o username=username,password=password //hostname/sharename /mnt
By default, Windows shares are mounted with 0777 permissions in Linux.
You can change the default permissions using dir_mode
and file_mode
options in mount
:
mount -t cifs -o username=username,password=password,dir_mode=0755,file_mode=0755 //hostname/sharename /mnt
To make the mount persistent, add the entry to /etc/fstab
:
//hostname/sharename /mountpoint cifs _netdev,username=username,password=password,dir_mode=0755,file_mode=0755,uid=500,gid=500 0 0