Ubuntu. Proper fstab entry to mount a samba share on boot?

$0
=
$0.2
+
$0
No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.
0

How can I mount samba shared directory after system reboot?

I'm tried this:

mount -t cifs //server/dir /mnt/share -o username=user,password=password

Thanks.

Tags: , , ,

1 Answer - total earned - 0.62 mBTC ($0.2 USD)

1
=
1
=
$0.2
1 tip with total amount of 0.62 mBTC($0.2 USD) have been sent by lampego

This method works in Ubuntu 12.01:

  1. Install cifs-utils: apt-get install cifs-utils

  2. Create file .smbcredentials:

    touch ~/.smbcredentials
    chmod 0600 ~/.smbcredentials
    
  3. Add to .smbcredentials your credintals:

    username=shareuser
    password=sharepassword
    domain=domain_or_workgroupname
    
  4. Edit your fstab file:

    nano /etc/fstab
    
  5. Add this line to fstab:

    /server/share /pathto/mountpoint cifs credentials=/home/username/.smbcredentials,uid=shareuser,gid=sharegroup 0 0
    
  6. Remount your drives(check errors):

    sudo mount -a
    

I hope it's helped you

SEND BITCOIN TIPS

Thanks very much :)

0

Post Answer


Will Bitcoin Tipping become a new Internet Culture?


Please share our story! THANK YOU!