mounting network samba drive using cifs in /etc/rc.local file
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.