Mount and unmount CIFS network file systems - RHEL7

Описание к видео Mount and unmount CIFS network file systems - RHEL7

Mount and unmount CIFS network file systems

Server: fileserver1.example.com 192.168.0.200
Client: localhost 192.168.4.250

yum install -y cifs-utils samba-client autofs

To list the shared directories of the server
smbclient -L 192.168.0.200

Mounting....

1. Manually
mkdir /mnt/data
mkdir /mnt/public
mount -t cifs -o credentials=/root/cred //192.168.0.200/My_Data /mnt/data
mount -t cifs -o guest //192.168.0.200/Public /mnt/public

2. Adding new entry in /etc/fstab
echo "//192.168.0.200/My_Data /mnt/data cifs _netdev,credentials=/root/cred 0 0" append /etc/fstab
echo "//192.168.0.200/Public /mnt/public cifs _netdev,guest 0 0" append /etc/fstab

3. Using autofs
echo "/share /etc/indirect.smb" to /etc/auto.master.d/smb.autofs
echo "data -fstype=cifs,credentials=/root/cred ://192.168.0.200/My_Data" to /etc/indirect.smb
echo "public -fstype=cifs,guest ://192.168.0.200/Public" append /etc/indirect.smb


Which method do you like more.....?

Комментарии

Информация по комментариям в разработке