Book Image

Troubleshooting CentOS

By : Jonathan Hobson
Book Image

Troubleshooting CentOS

By: Jonathan Hobson

Overview of this book

Table of Contents (17 chapters)
Troubleshooting CentOS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using autofs to mount an external drive


If you wish to make the process of attaching an external drive (through cifs) permanent (persistent), then you will need to begin by installing the autofs package in the following way:

# yum install autofs

Having installed the package, you will then need to ensure that you start and enable the autofs service like this:

# systemctl start autofs
# systemctl enable autofs

Having done this, and assuming we will be using the same mount point as discussed here, you should begin the configuration of the autofs service by creating a credentials file in your favorite text editor by typing this:

# nano /path/to/credentials.txt

Now, add the required network credentials like this:

username=<access_username>
password=<access_password>

Having saved and closed this file, make sure that the permissions are modified to ensure system security:

# chmod 600 /path/to/credentials.txt

The next stage of this process is to open the autofs configuration file:

# nano...