Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Однократное подключение сетевой CIFS шары \\usernas\temp

Блок кода
themeEmacs
languagebash
sudo mount -t cifs //192.168.51.30/Temp /mnt/usernas/

Однократное подключение сетевой шары на системе NTFS

Блок кода
themeEmacs
languagebash
mount.cifs //192.168.1.8/DATA /mnt/jupiter -o user=testuser pass=P@ssw0rd

Автоподключение шары через FSTAB

Windows Share: //192.168.1.105/Lbackups this is the share on the windows server that we will be mounting on the Linux box (we use IP because it works all the time, DNS sometimes fails)

Linux Box Name: Dev-CentOS

the first thing that needs to be done is go ahead and type the following command to install the samba client:

Блок кода
themeEmacs
languagebash
yum install samba-client

after that is done installing, install the CIFS-Utils by using the below command:

Блок кода
themeEmacs
languagebash
yum install cifs-utils

we have to next make a directory that the share will mount to, to do so, issue the following command:

Блок кода
themeEmacs
languagebash
mkdir /mnt/Lbackups

from here we need to go into our File System Tab, to do so, type

Блок кода
themeEmacs
languagebash
vi /etc/fstab

as you can see there is a NFS share already mounted, and an extra hard drive:

 we are going to add to this, go to the bottom, and add a note:

a couple of variables here:

192.168.1.105 = the ip of the server you are mounting to

:/Lbackups = the name of the share you are connecting to

/mnt/Lbackups = where it will show up on the local system

cifs = filesystem type, a windows share on Linux is recognized as cifs

username/password= Active directory Username/Password that has permission to that share. I suggest using a service account for this

save and quit out of the fstab.

Restart the mounts:

Блок кода
themeEmacs
languagebash
sudo mount -a