The last part of the objective Configure systems to mount network file systems automatically is related to this objective, Mount and unmount cifs and nfs network file systems, all we need to do is make the mount permanent by adding to the /etc/fstab file.
NFS
Add the following line to your /etc/fstab file:
10:168.20.225:/inst /distro nfs defaults 0 0This will mount the nfs share /inst on 10.168.20.225 to a directory called /distro, with default options.
CIFS
Add the following line to your /etc/fstab file:
\\10.168.20.112\c$ /test cifs cred=/cred.cifs 0 0This will mount the c drive of 10.168.20.112 to /test. The cred.cifs file contains the credentials needed to mount the share. This file needs to have the following format:
username=valueOf course, you could simply pass the credentials as options instead of a credentials file. Ensure that the file /cred.cifs is only readable by the appropriate user(s).
password=value
domain=value
No comments:
Post a Comment