LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-06-2009, 06:24 PM   #1
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
mounting network samba drive using cifs in /etc/rc.local file


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 09:08 PM. Reason: adding tags, clarifying the question, cleaning up grammar
 
Old 09-06-2009, 09:45 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
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
 
Old 09-09-2009, 08:22 PM   #3
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
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 08:49 PM.
 
  


Reply

Tags
drive, mount, network, samba



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 03:21 AM
[Debian Lenny::Samba/CIFS] Network File Transfers Slow t3hl33td4rg0n Linux - Server 0 03-12-2008 11:11 PM
Mounting Windows network drive from Linux with cifs / dfs big_linux_geek Linux - Software 0 05-11-2006 02:24 PM
Mounting network drive using Samba cvzyl Linux - Software 4 04-01-2006 04:40 AM
Mounting network drive with samba. Valhalla Linux - Networking 4 02-23-2005 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:34 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
Open Source Consulting | Domain Registration