1) Install cifs-utils and autofs packages
# apt-get install cifs-utils autofs

2) Create CIFS credentials file $HOME/.cifs-credentials
username=
password=
domain=WORKGROUP

3) Change permissions on $HOME/.cifs-credentials
# chmod 600 $HOME/.cifs-credentials
# chown username $HOME/.cifs-credentials

4) Add the cifs automounter tree in /etc/auto.master:
/mounts /etc/auto.mounts

5.a) For a CIFS network share, add the following file system information to /etc/auto.mounts:
share1 -fstype=cifs,user,_netdev,cache=none,credentials=/home/username/.cifs-credentials ://server/share1

5.b) For a NFS network share, add the following file system information to /etc/auto.mounts:
share2 -fstype=nfs,user,_netdev,x-systemd.automount,rw,rsize=32768,wsize=32768,nfsvers=3,proto=tcp,tcp,hard,intr,timeo=60,retrans=10,noacl,nocto,noatime,nodiratime,actimeo=0,async server:/share2

6) Restart autofs
$ sudo service autofs restart

7) Open dolphin and browse the share /mounts/share1.

Advertisements