How to use autofs to access Windows and Samba shares?

How to use autofs to access Windows and Samba shares?

This file is a slightly modified version of the file auto.smb which usually comes as part of the autofs package. You need to modify the line defining the mountopts above and change user to the name of your personal account name. Now you have to give autofs the credentials needed to access shares on your network. To do this create a file called

What to do if autofs fails to Mount SAMBA CIFS?

If using Samba and CIFS, ensure smb is active and running on the server. If using NFS, ensure NFS is active and running on both the client and server. If possible, disable Firewalld and Iptables on both the client and server. If possible, disable SELinux on both the client and server.

How to install autofs for SMB shares in Ubuntu?

You need to install autofs and cifs-utils. On Ubuntu, you can use apt-get to get these. You’ll also need a folder where you want to mount your shares, in my case, this will be /mnt/net/smb for SMB shares and /mnt/net/nfs for NFS shares.

How to check auto.cifs-shares in NFS?

This tells autofs to check auto.cifs-shares when you try to access a share in /mnt/net/smb, and similarly for nfs. The configuration files contain one share per line. The first part of the line is the directory name that will be used for the share, after that, you have to provide how the connection should be made and finally the target.

How to mount a samba share in Linux?

The file fstab contains descriptive information about the various file systems. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file. To mount a Samba share to be mounted when a Linux system comes up after reboot edit the /etc/fstab file and put entry as follows

How can I Make my autofs file executable?

Make this file executable using the command: This file is a slightly modified version of the file auto.smb which usually comes as part of the autofs package. You need to modify the line defining the mountopts above and change user to the name of your personal account name.

How to tell autofs to use a new configuration file?

The content of these files should like the following example: to protect the password information. Now we have to tell autofs to make use of our new configuration file. Use the commands: That’s all. to check, if it works. If not, consult the system logfiles (usually /var/log/messages or /var/log/syslog) for messages.