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.
This method works in Ubuntu 12.01:
Install cifs-utils: apt-get install cifs-utils
Create file .smbcredentials:
touch ~/.smbcredentials
chmod 0600 ~/.smbcredentials
Add to .smbcredentials your credintals:
username=shareuser
password=sharepassword
domain=domain_or_workgroupname
Edit your fstab file:
nano /etc/fstab
Add this line to fstab:
/server/share /pathto/mountpoint cifs credentials=/home/username/.smbcredentials,uid=shareuser,gid=sharegroup 0 0
Remount your drives(check errors):
sudo mount -a
I hope it's helped you
FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.
Boost your productivity with FavScripts.com!