Solved

Keep windows shared folder mounted indefinitely

Posted on 2013-05-30
2
412 Views
Last Modified: 2013-05-30
In a previous question, I needed to have a 64 bit 12.04 ubuntu server client that hosted on a hypervisor host have access to a shared folder.  

That has been solved.  

Now I just need to know how to keep that mounted, and/or to have that mounted on boot so that in the event of a crash it will come back up.
0
Comment
Question by:Illyankesh
2 Comments
 
LVL 4

Accepted Solution

by:
Rsilva98 earned 500 total points
Comment Utility
what type of share u have ? samba? cifs?

Never the less you can create add it in your edit /etc/fstab file.

Example: //servername/sharename  /media/windowsshare  cifs  username=msusername,password=mspassword,iocharset=utf8,sec=ntlm  0  0

Note the user and password will be exposed since the fstab is readable.

You can do this to prevent it

gedit ~/.smbcredentials

Enter your Windows username and password in the file:

username=msusername
password=mspassword

Save the file, exit the editor.

Change the permissions of the file to prevent unwanted access to your credentials:

chmod 600 ~/.smbcredentials

Then edit your /etc/fstab file (with root privileges) to add this line (replacing the insecure line in the example above, if you added it):

//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

test the fstab entry by issuing:

sudo mount -a

If there are no errors, you should test how it works after a reboot. Your remote share should mount automatically.
0
 

Author Closing Comment

by:Illyankesh
Comment Utility
You are the man  :)   thanks for such a detailed, and accurate answer, in such a ridiculously short amount of time.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now