Automatically mount Samba shares on startup - Linux

preview_player
Показать описание
This should work on most recentish Linux distro's. Simple stuff I know but when I've put a lot of people onto Linux, this was one of the simpler things they were unsure of.

Note: Replace the

Template:
//192.168.1.1/yoursharename /path/to/mount/directory cifs credentials=/path/to/credentials/file,uid=yourlinuxuid 0 0
Example:

And if you don't want to worry about having a seperate credentials file, you can use this format

Template:
//192.168.1.1/yoursharename /path/to/mount/directory cifs username=yourusername,password=yourpassword,uid=yourlinuxuid 0 0
Example:
//192.168.1.1/music /mnt/samba/music cifs username=james,password=password123,uid=james 0 0

Further Reading:
Рекомендации по теме
Комментарии
Автор

Thank you for a great video. Nice straightforward presentation on a topic that so many others seem to want to complicate needlessly.

inkswamp
Автор

Worked like a champ! Your tutorial was the best of all I have tried, and the only one that worked.

blakenorthrup
Автор

Worked perfectly, all these years later on Ubuntu 18.04 accessing a Windows active directory share.

TheECWay
Автор

Great video! Thanks. Say I don't want to use fstab and just wanted to mount a share using the terminal, how do I do that?

rmcellig
Автор

What if samba share is inaccessible for the time being? As far as I understand your linux machine won't bootstrap. Am I right?

boonya
Автор

Worked for me after official docs didn't. Many thanks

tinbadger
Автор

Great tutorial. Will this work for NFS as well?

rafierafie
Автор

I spend my last cash on crystal meth. no I can't sleep. :-(

metalwellington