You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

You will need to install cifs-utils in order to mount samba shared directory:

sudo yum -y install cifs-utils


To mount in root account, run below commands:

sudo mount -t cifs //192.168.10.21/repository /mnt/nas -ousername=yourUserName,password=yourPassword,file_mode=0664,dir_mode=0775,uid=root,gid=root

If you want to mount the samba shared directory when your server boot, you will need to create your credentials at /your_preferred_directory/config

username=yourUserName
password=yourPassword

and add below lines at /etc/fstab

//192.168.10.21/repository /mnt/nas cifs    credentials=/your_preferred_directory/config,uid=root,gid=root 0 0

If you want to take it effect right away, run

sudo mount -a

Otherwise, the samba shared directory will be automatically mounted when you reboot your machine.

  • No labels