Author Topic: How to mount LMCE's SMB Share in Ubuntu?  (Read 3040 times)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
How to mount LMCE's SMB Share in Ubuntu?
« on: April 28, 2008, 09:19:24 pm »
I use Ubuntu at home. I want each of my Ubuntu computers to use the folder structure of the core to to store media (I.e. Limewire on my Ubuntu box would download files directly to the appropriate /home/public directory on the core. I have been manually syncing files up to this point, and its just too much of a pain. What I would like is a permanently mounted folder in Ubuntu that was linked directly to the folder on the core. How should I go about this?

thanks,

Jon

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: How to mount LMCE's SMB Share in Ubuntu?
« Reply #1 on: April 29, 2008, 06:08:25 am »
sudo mkdir /mnt/test
sudo mount -t cifs //192.168.80.1/public /mnt/test -o "username=Roy,password=SECRET"

Substitute your username and password that you use to log into web admin.

If you are curious, look in /etc/samba/smb.conf on your dcerouter.

HTH,
Roy

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: How to mount LMCE's SMB Share in Ubuntu?
« Reply #2 on: April 29, 2008, 02:12:29 pm »
If you want to do it permanently, it is best to add a line describing the mount to /etc/fstab and see: http://wiki.linuxmce.org/index.php/Logging_In#The_sambahelper_account for the usename/password.
"Change is inevitable. Progress is optional."
-- Anonymous


jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: How to mount LMCE's SMB Share in Ubuntu?
« Reply #3 on: April 29, 2008, 08:12:58 pm »
Not having too much luck with this so far (I've never done a manual fstab entry). Here is my fstab after the addition:
Code: [Select]
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
UUID=2d1592f3-2998-4974-9075-3158c47c1208 /               ext3    defaults,errors=remount-ro 0       1
# /dev/sda5
UUID=66a44c56-7ee0-4f06-9212-d888b9dd1522 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd1       /media/cdrom1   udf,iso9660 user,noauto     0       0
//192.168.80.1/public       /mnt/LMCE     cifs     username=jondecker76,password=xxxxxxx     

does the entry look right? Do I have to also create the /mnt/LMCE folder? So far, doing a reboot does not mount the share, but I'm sure i don't have the entry quite right.

Thanks for the help

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: How to mount LMCE's SMB Share in Ubuntu?
« Reply #4 on: April 29, 2008, 09:08:59 pm »
Do I have to also create the /mnt/LMCE folder?

yes.

My preference is to manually mount a share first as a test.  Once that works, then get fstab working. 

Example flow:
Code: [Select]
sudo -i
mkdir /mnt/LMCE
mount -t cifs //192.168.80.1/public /mnt/LMCE -o "username=jondecker76,password=xxxxxxx"
ls /mnt/LMCE
Once you see the share in /mnt/LMCE
Code: [Select]
umount /mnt/LMCE
vi /etc/fstab
*** add fstab line and save
mount /mnt/LMCE
ls /mnt/LMCE
Then once that is working, do a reboot just to be sure.

Personally, I'd add noauto and rw options to the fstab entry and set dump & pass to 0:
Code: [Select]
//192.168.80.1/public       /mnt/LMCE     cifs     noauto,rw username=jondecker76,password=xxxxxxx 0 0

HTH,
Roy