This one should be easy: when you want to mount multiple shares automatically at startup using Fstab and .smbcredentials, is there a way to use only one .smbcredentials file and put the passwords for each share in there? Or is it really necessary to do the inelegant way that I have: just create a second file called ".smbcredentials2"? Thanks.
Here are the general instructions from the Ubuntu wiki for automounting (NOTE: for other newbies out there, mounting is necessary to view certain files directly from the share (e.g., VLC) on Kubuntu):
The quickest way to auto-mounting a password-protected share is to edit /etc/fstab (with root privileges), to add this line:
This is not a good idea however: /etc/fstab is readable by everyone and so is your Windows password in it. The way around this is to use a credentials file. This is a file that contains just the username and password.
Using a text editor, create a file for your remote servers logon credential:
Enter your Windows username and password in the file:
Save the file, exit the editor.
Change the permissions of the file to prevent unwanted access to your credentials:
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):
Save the file, exit the editor.
Finally, test the fstab entry by issuing:
If there are no errors, you should test how it works after a reboot. Your remote share should mount automatically.
Here are the general instructions from the Ubuntu wiki for automounting (NOTE: for other newbies out there, mounting is necessary to view certain files directly from the share (e.g., VLC) on Kubuntu):
The quickest way to auto-mounting a password-protected share is to edit /etc/fstab (with root privileges), to add this line:
Code:
//servername/sharename /media/windowsshare cifs username=msusername,password=mspassword,iocharset=utf8,sec=ntlm 0 0
Using a text editor, create a file for your remote servers logon credential:
Code:
gedit ~/.smbcredentials
Code:
username=msusername password=mspassword
Change the permissions of the file to prevent unwanted access to your credentials:
Code:
chmod 600 ~/.smbcredentials
Code:
//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
Finally, test the fstab entry by issuing:
Code:
sudo mount -a
Comment