LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-09-2005, 04:51 PM   #1
mvo
Member
 
Registered: Apr 2005
Location: Delhi, India
Distribution: Mostly Fedora
Posts: 42

Rep: Reputation: 15
Mounting of windowsshare on startup


During startup of a Linux client I want to automatically mount the windows-share of the LAN.

Now I do it manually after startup with :
#mount -t smbfs //fileserver/compartiendo /mnt/comp -o username=.....password=..

Where can I place such a line in the Linux client (fedora 3) to let it be done automatically?
 
Old 05-09-2005, 05:32 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
I think that you need a line in your fstab that looks like this

//windowsmachinename/folder /mnt/folder smbfs username=usr,password=pass,dmask=0077,fmask=0066,_netdev 0 0

The _netdev option is a good idea for network shares, It defers mounting the share until the network is up.

Because the /etc/fstab is world readable, you might want to use
'credentials=/etc/sharepasswd'
as one of the options rather than password=pass.

I think that using separate dmask and fmask options for VFAT and smbfs mounts is preferable to using umask. In a mount command, the umask is different than the shell setting. For public shares, it is best for security reasons not to allow program execution. This can be done with either the noexec option or masking out the 'x' permission in the fmask option. But the 'x' permission bit has a different usage for directories. It allows/denies entering the directory.


Last edited by jschiwal; 05-09-2005 at 05:42 PM.
 
Old 05-10-2005, 10:42 AM   #3
mvo
Member
 
Registered: Apr 2005
Location: Delhi, India
Distribution: Mostly Fedora
Posts: 42

Original Poster
Rep: Reputation: 15
Works excellent, thanks!!
 
  


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
reboots on startup (mounting cdrom?) aknittel Linux - Hardware 2 11-23-2005 04:01 AM
help mounting at startup mallyooh Linux - Newbie 2 09-25-2004 03:56 PM
Auto-mounting drives at startup MandrakeDave Linux - General 7 09-29-2003 05:19 PM
Mounting on Startup gauge73 Linux - Newbie 1 01-20-2003 02:37 PM
mounting at startup Druaga Linux - Hardware 5 08-22-2002 11:25 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration