...
Code Block |
---|
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
Code Block |
---|
username=yourUserName
password=yourPassword |
and add below lines at /etc/fstab
Code Block |
---|
//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
Code Block |
---|
mount -a |
Otherwise, the samba shared directory will be automatically mounted when you reboot your machine.