VectorLinux
September 18, 2014, 09:33:10 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: automating cifs [solved]  (Read 1502 times)
JJSH
Member
*
Posts: 27


« on: January 09, 2008, 12:07:28 pm »

I am mounting network shares from my NAS box using the following from a terminal;

mount -t cifs //nas-ip-address/sharename  /home/jjsh/mnt/sharename -o user=jjsh,password=mypassword


I need to SU to do this, and there are a number of shares that I mount, that then appear in the mnt directory of my home.

Where can I put this so that this is automated during boot?


TIA

JJSH
« Last Edit: January 09, 2008, 03:04:16 pm by nightflier » Logged
newt
Vectorian
****
Posts: 1132



« Reply #1 on: January 09, 2008, 12:12:29 pm »

edit:
I think '/etc/fstab' would be the best place.
see nightfliers post below (still learning over here Cheesy)
« Last Edit: January 09, 2008, 12:51:23 pm by newtor » Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #2 on: January 09, 2008, 12:41:59 pm »

What I have found, is that /etc/fstab is processed before cifs/smbfs is loaded, and therefore fail to mount network shares.

I have had better luck using /etc/rc.d/rc.local  It is run with root privileges. You can add your commands to that file.
Logged
JJSH
Member
*
Posts: 27


« Reply #3 on: January 09, 2008, 02:39:50 pm »

Cheers Nightflier. Can I just add the same line that I type into the terminal?


Update: Yes, yes I can! All sorted. Thanks for the help, you can mark this thread solved  Grin
« Last Edit: January 09, 2008, 02:46:38 pm by JJSH » Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #4 on: January 09, 2008, 03:05:24 pm »

Done. Happy to be of help.   Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!