LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 09-06-2009, 07:24 PM   #1
rioguia
Member
 
Registered: Jun 2002
Posts: 400
Thanked: 0
mounting network samba drive using cifs in /etc/rc.local file


[Log in to get rid of this advertisement]
I have a samba server (CENTOS 5.3). The server has a share called "export_name." For the purpose of this question, the share has no password.

I want to mount "export_name" automatically when I boot on a client (UBUNTU 9.4). The mountpoint is called "/home/my_local_user_name/export_name."

I have added this single line to the /etc/rc.local file on the UBUNTU client, saved it, and set the executable bit (chmod + /etc/rc.local). The line is as follows:

mount -o username=user //192.xxx.xxx.xxx/export_name /home/my_local_user_name/export_name

This rc.local file does not work on boot but works only when I open a terminal and type:
sudo sh /etc/rc.local

Last edited by rioguia; 09-06-2009 at 10:08 PM.. Reason: adding tags, clarifying the question, cleaning up grammar
linuxubuntu rioguia is offline  
Tag This Post , , , ,
Reply With Quote
Old 09-06-2009, 10:45 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,596
Thanked: 12
Why not add it to you /etc/fstab file?

Code:
//remoteserver/share /mnt/share smbfs auto,credentials=/root/.smbcredentials,uid=user,gid=user,fmask=0777,dmask=0777 0 0
linuxfedora crabboy is offline     Reply With Quote
Old 09-09-2009, 09:22 PM   #3
rioguia
Member
 
Registered: Jun 2002
Posts: 400
Thanked: 0

Original Poster
Thanks for your reply.

SMBFS has been depreciated and is no longer included in Ubuntu. If smbfs is necessary, you have to compile it from source, or use a version of Ubuntu earlier than Hardy (not recommended).

Last edited by rioguia; 09-09-2009 at 09:49 PM..
linuxubuntu rioguia is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Trouble with mounting window xp system using samba, smbclient, smbfs and cifs milkies27 Linux - Newbie 3 05-29-2009 04:21 AM
[Debian Lenny::Samba/CIFS] Network File Transfers Slow t3hl33td4rg0n Linux - Server 0 03-14-2008 08:44 AM
Mounting Windows network drive from Linux with cifs / dfs big_linux_geek Linux - Software 0 05-11-2006 03:24 PM
Mounting network drive using Samba cvzyl Linux - Software 4 04-01-2006 05:40 AM
Mounting network drive with samba. Valhalla Linux - Networking 4 02-23-2005 04:54 PM


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

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration