VectorLinux
August 28, 2014, 03:06:22 am *
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: Accessing/mounting Samba shares automatically  (Read 1895 times)
Freeman
Tester
Vectorite
****
Posts: 323


Choice to the user!


« on: March 02, 2008, 02:34:26 am »

I used this line from our wonderful Howto section to mount a samba share on my Vectorlinuxbox:
Code:
/usr/bin/smbmount //winmachine-1/shared /path/dir -o username=user_name

Now I wanted to automate this process and looked at the link provided in the Howto. This was a script especially created to mount sambadrives. But still, isn't it possible to paste this line in /etc/fstab? The only thing I'm missing in this command is the possibility to enter automatically my password...

Any thoughts on this?

Thanks!
Freeman Smiley
Logged

It's better to die 10 times, than never to have loved at all.
nightflier
Administrator
Vectorian
*****
Posts: 4022



« Reply #1 on: March 02, 2008, 05:15:20 am »

Here is how I do it:
I have a file ~/.smb/creds:
Code:
username=user
password=pass
The mount command is:
Code:
smbmount //computer/share /path/dir -o credentials=/home/user/.smb/creds

Problem with using fstab is that the network is not up by the time it is processed.
I call my mount command from KDE's Autostart folder.
You can also use /etc/rc.d/rc.local, but that one is run as root, which may cause some read-write issues.

Here is a guide on using ~/.bashrc: http://blog.unixlore.net/2006/05/accessing-windows-shares-from-gnulinux.html
« Last Edit: March 02, 2008, 05:22:41 am by nightflier » Logged
Freeman
Tester
Vectorite
****
Posts: 323


Choice to the user!


« Reply #2 on: March 04, 2008, 10:36:21 am »

Thanks Nightflier, that did the trick!
Logged

It's better to die 10 times, than never to have loved at all.
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!