I got really, really sick of the 20 second delay and the wall of cifs errors I got when I mounted my samba shares thru fstab. All of the errors pertain to trying to mount the shares with no network. Once I was logged on, my shares where mounted so I didn't pay too much attention to it. But it irritated me more and more often as time went on.
So I decided to figure out a way to mount my shares after the network started.
1) I removed my samba shares from my /etc/fstab file.
2) I created a script named /etc/network/if-up.d/shares and made sure that root was the owner.
The terminal:
the script:
3) reboot
For you purists, and those new to samba and network shares, the above script is broken down as:
For everyone looking for the basics, or need a better understanding of what I'm doing, the page below is an excellent read:
https://wiki.ubuntu.com/MountWindowsSharesPermanently
So I decided to figure out a way to mount my shares after the network started.
1) I removed my samba shares from my /etc/fstab file.
2) I created a script named /etc/network/if-up.d/shares and made sure that root was the owner.
The terminal:
Code:
pat@Pats-Main:~$ sudo nano /etc/network/if-up.d/shares
Code:
#!/bin/bash mount.cifs //192.168.1.13/Homes /media/Homes -o credentials=/home/pat/.smbcredentials,iocharset=utf8,sec=ntlm mount.cifs //192.168.1.13/Shares /media/Shares -o guest,uid=1000,iocharset=utf8
3) reboot
For you purists, and those new to samba and network shares, the above script is broken down as:
Code:
#!/bin/bash mount.cifs //server_addy/share_name /mount/point -o options
https://wiki.ubuntu.com/MountWindowsSharesPermanently
Comment