How to make the mounting permanent?
Open /etc/fstab d
sudo vim /etc/fstab
and add line
//REMOTE-WIN-NAME-OR-IP/REMOTE-SHARED-FOLdER /LOCAL-LINUX-SHARE user=WIN-USERNAME,domain=WIN-DOAMIN,password=WIN-PASS,iocharset=utf8 0 0
in my case
//192.168.10.108/D /home/palo/share/PC-D/ cifs user=palo,domain=kis,password=********,iocharset=utf8 0 0
then remount it all
sudo mount -a
and check with
mount
More secure way of the same
Previous example has a problem that the /etc/fstab may read someone and see your passwords, therefore a secure way of the same is to make a local text file
vim ~.credentials
and put there
username=valuevalue
password=valuevalue
domain=valuevalue
whare “value” are yours usernanme/password/domain_name
then modify /etc/fstab line from
//REMOTE-WIN-NAME-OR-IP/REMOTE-SHARED-FOLdER /LOCAL-LINUX-SHARE user=WIN-USERNAME,domain=WIN-DOAMIN,password=WIN-PASS,iocharset=utf8 0 0
to
//REMOTE-WIN-NAME-OR-IP/REMOTE-SHARED-FOLdER /LOCAL-LINUX-SHARE credentials=/root/.win_creditals,iocharset=utf8 0 0
then close the file and run
sudo mount -a
Done!
Benim kullandıgım dosyalar:
/etc/fstab
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda1 during installation UUID=9cea0017-3082-4b1d-bd9a-7090aef15515 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=49581f69-2a85-42fc-bf4a-d14a4a6ce314 none swap sw 0 0 #//192.168.10.108/D /home/palo/share/PC-D/ cifs user=palo,domain=kis,password=********,iocharset=utf8 0 0 //172.16.2./Users/Administrator/Desktop/test /home/fatih/shred cifs credentials=/root/.win_creditals,iocharset=utf8 0 0
/root/.win_credital içeriği
username=Administrator password=xxxxxx domain=SKxxS.NET
mount ve umount’u elle yapmak için
mount.cifs //172.16.x.x/Users/Administrator/Desktop/test /home/fth/shred -o user=Administrator,domain=SKxxS.NET umount -t cifs /home/fth/shred
Bir cevap yazın