LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Mount Network Drives On "FSTAB" (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-mount-network-drives-on-fstab-938006/)

gemmajid 04-04-2012 12:55 AM

How to Mount Network Drives On "FSTAB"
 
Hello All,

I'm having Ubuntu Server with samba sharing i want to mount that samba sharing in CentOs 6.2 Permanently in fstab but i'm unable to do that.

I'm able to mount those shares temporarily with this command,

mount -t cifs -o username=gem,password=gem123 //192.168.1.200/Utils /home/test/Desktop/Windows/

This command is running perfectly but this is not permanent.

This is my fstab file.
Kindly let me know that what entry should i use to mount it permanently.

#
# /etc/fstab
# Created by anaconda on Tue Mar 20 15:28:03 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=1fef3795-2f13-4536-9f1f-4f29ceec3499 / ext4 defaults 1 1
UUID=85a41d20-3efd-4410-9bbe-e7ea7f1ddea9 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

chrism01 04-04-2012 12:59 AM

Try this http://opensuse.swerdna.org/susesambacifs.html#permsec :)

gemmajid 04-04-2012 02:08 AM

Dear chrism01,

I have followed your Instructions & i have used this entry in fstab
//192.168.44.100/share /path_to/mount cifs username=server_user,password=secret,_netdev 0 0

and it works but the problem is that the drives which i mount are read only neither i can create any document nor delete any document how can i fix this problem.

deep27ak 04-04-2012 02:20 AM

add this extra option

Code:

//192.168.44.100/share /path_to/mount cifs username=server_user,password=secret,_netdev,file_mode=0777,dir_mode=0777 0 0
and test with
Code:

#sudo mount -a
for further refrence follow this link
https://wiki.ubuntu.com/MountWindowsSharesPermanently

gemmajid 04-04-2012 03:03 AM

Dear deep27ak,

I have used your additional entry and it works but still i'm unable to create any document or copy any document in to the sharing folder, remember one thing that this only happens when i use through the mounted area but if i access the sharing through (Place --> Connect to Server) then it's working.

rdpayne 11-18-2016 10:54 AM

Similar problem solved
 
I was having a similar problem with server shares mounted via fstab
I fixed it by mounting the shares in my own home directory


All times are GMT -5. The time now is 10:03 AM.