LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-13-2009, 03:48 PM   #1
gwbaby
LQ Newbie
 
Registered: Jul 2009
Distribution: Fedora 11
Posts: 15

Rep: Reputation: 0
Smile every times, samba mounting automatically


Long story as short, I found that smbmount doesn't work, but "mount -t cifs //machine/direcotory /mount point" working fine.

Now, I am commanding mount -t cifs //192.168.1.230/fileserver /samba-mount every time.

How can I mount this network folder automatically?

--------------------------------------------------------------
[My distro is Fedora 11]
 
Old 07-13-2009, 06:04 PM   #2
bryanl
Member
 
Registered: Dec 2003
Posts: 96

Rep: Reputation: 35
install autofs and smbfs and see if Accessing Windows Or Samba Shares Using AutoFS | HowtoForge - Linux Howtos and Tutorials will help get it going. You might also check autofs on bononline.

What I do is to enable the auto.smb line in auto.master (and change the link directory to /lan but the default may be OK), create a credentials file auto.smb.[servername] works just fine. Then I can ls the link directory to see the available servers and drill down from there.

If all you want to do is to connect to an existing directory, then just use a static link in autofs.master - a key is to make sure the owner of the link point on your system is suitable.

Last edited by bryanl; 07-13-2009 at 06:05 PM.
 
Old 07-13-2009, 10:48 PM   #3
viGeek
LQ Newbie
 
Registered: Jul 2009
Posts: 28

Rep: Reputation: 17
Quote:
Originally Posted by gwbaby View Post
Long story as short, I found that smbmount doesn't work, but "mount -t cifs //machine/direcotory /mount point" working fine.

Now, I am commanding mount -t cifs //192.168.1.230/fileserver /samba-mount every time.

How can I mount this network folder automatically?

--------------------------------------------------------------
[My distro is Fedora 11]
Add: mount -t cifs //192.168.1.230/fileserver /samba-mount

To /etc/rc.local

This will automatically mount it upon startup. You could also write a small script that would do i.e then run it as a cron to occasionally check and remount

if df -h | grep -q "fileserver"
then
#do nothing
else
mount -t cifs //192.168.1.230/fileserver /samba-mount every time.
fi
 
  


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
LXer: Automatically mounting and unmounting Samba/Windows shares with CIFS LXer Syndicated Linux News 0 07-27-2007 11:01 AM
Automatically measuring command execution times big_manel Linux - General 5 04-08-2007 08:52 PM
how to automatically block an IP after trying log in multiple times? parv Linux - Security 2 03-04-2007 09:37 PM
automatically mounting using captive madiyaan Linux - Newbie 3 03-16-2005 05:39 AM
Automatically mounting to other machines ankitgdit Linux - Security 1 08-08-2003 10:08 AM


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

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