Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-09-2005, 05:51 PM   #1
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, 06:32 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
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
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 06:42 PM.
Old 05-10-2005, 11:42 AM   #3
Registered: Apr 2005
Location: Delhi, India
Distribution: Mostly Fedora
Posts: 42

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


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 05:01 AM
help mounting at startup mallyooh Linux - Newbie 2 09-25-2004 04:56 PM
Auto-mounting drives at startup MandrakeDave Linux - General 7 09-29-2003 06:19 PM
Mounting on Startup gauge73 Linux - Newbie 1 01-20-2003 03:37 PM
mounting at startup Druaga Linux - Hardware 5 08-23-2002 12:25 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:02 PM.

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