Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to mount a samba share permanently in ubuntu 10.10? Also i dont want to display the share icon in my desktop. How to acheive this task?

share|improve this question

4 Answers 4

You should add it to /etc/fstab. I don't have a SMB server available at the moment but I think the fstab entry should look something like:

//server/share /mountpoint smbfs

man fstab and man mount are your friends here.

share|improve this answer

Here is a very detailed set of instructions on how to do this permanently from an Ubuntu point of view.

https://help.ubuntu.com/community/MountWindowsSharesPermanently

share|improve this answer
    
I don't think the question involves windows. –  opensourcechris Jul 2 '13 at 18:06

better choice than

mount -t smbfs //servername/sharename /mountdirectory -o username=mywindowsusername,password=mywindowspassword

sould be

sudo mount -t smbfs //servername/sharename /mountdirectory -o credentials=/root/.credMywindowsAccount

and in /root/.credMyWindowsAccount

username=mywindowsusername
password=mywindowspassword
share|improve this answer
    
it is not a permanent mount, after reboot mount is lost... –  Dee May 13 at 11:43

If you ask about permanent mount, you should use configuraion via fstab.

Edit file //etc/fstab with root priviledges (for example sudo leafpad //etc/fstab)

and add a line which could look like this:

//<IPaddress>/<ShareName>   /<mountPoint>   cifs    user=<userName>,pass=<passwd> 0 0

You should use network drive username and password. Disadvantage is password written in a file. MountPoint should exist, (for example /mnt/NetworkDrive), create the folder before you reboot.

Save fstab and reboot. Done.

To ommit disadvantages, create .smbcredentials file

sudo leafpad /home/.smbcredentials

with following structure:

username=msusername
password=mspassword

and set

sudo chmod 600 /home/.smbcredentials

fstab line should be then as follows:

//<IPaddress>/<ShareName>   /<mountPoint>   cifs    rw,credentials=/home/.smbcredentials,iocharset=utf8,nounix, file_mode=0777,dir_mode=0777 0 0
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.