LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-04-2012, 12:55 AM   #1
gemmajid
Member
 
Registered: Mar 2012
Location: Karachi
Distribution: Ubuntu, RedHat, CentOs,
Posts: 71

Rep: Reputation: Disabled
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
 
Old 04-04-2012, 12:59 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
Try this http://opensuse.swerdna.org/susesambacifs.html#permsec
 
Old 04-04-2012, 02:08 AM   #3
gemmajid
Member
 
Registered: Mar 2012
Location: Karachi
Distribution: Ubuntu, RedHat, CentOs,
Posts: 71

Original Poster
Rep: Reputation: Disabled
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.
 
Old 04-04-2012, 02:20 AM   #4
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
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

Last edited by deep27ak; 04-04-2012 at 02:21 AM.
 
Old 04-04-2012, 03:03 AM   #5
gemmajid
Member
 
Registered: Mar 2012
Location: Karachi
Distribution: Ubuntu, RedHat, CentOs,
Posts: 71

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failure to mount drives. "Cannot obtain lock on /media/.hal-mtab" tolle66 Linux - Newbie 1 01-21-2009 12:09 PM
* KipBond "rescue" mode can't mount filesystem w/ LABEL=/ in fstab KipBond Red Hat 0 02-06-2008 07:09 PM
Doesn't mount multiple USB drives (one "port") jpantone Linux - Hardware 2 03-08-2007 02:16 PM
Fstab - "mount point does not exist" wahming Linux - Newbie 2 02-05-2007 03:34 AM
problems with smbfs mount-point in /etc/fstab - "mount -a" works, but not at boottime MarkSide Linux - Software 4 11-20-2005 03:30 PM


All times are GMT -5. The time now is 09:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration