CIFS¶
Mount CIFS in Linux¶
Instructions on how to mount a windows share read-only that mounts on startup. If you are unsure if a share is already mounted you can use the <pre>mount</pre> command to list all mounted filesystems
Become super user
su -
Ensure you have cifs-utils installed
yum install -y cifs-utils
Create mount point
mkdir -p /path/to/mountpoint chmod 755 /path/to/mountpointCreate credentials file
cat <<EOF > /etc/credentials.share001 username=share_username password=password_for_username EOF chmod 600 /etc/credentials.share001
Create fstab entry
cat <<EOF >> /etc/fstab //<windows_ip_address>/<sharename> /path/to/mountpoint cifs ro,credentials=/etc/credentials.share001 EOF
Mount the drive
mount -a