I know there are many threads about it on the internet, I tried many of them, but I swear, none solved my problem :(
I work on a Ubuntu 14.04 LTS, and we have a Windows server where there is a shared folder which we use as a server for development.
I researched a lot and got the following configuration to mount the shared folder:
//ip/shared_folder ubuntu_folder cifs credentials=/home/ubuntu_user/.smbcredentials,uid=windows_user,domain=workgroup,iocharset=utf8,_netdev,sec=ntlm 0 0
username=windows_user
password=windows_pass
domain=workgroup
If I type
sudo mount -a
all works fine, and I have my mounted windows shared folders.
My problem is that every time I reboot, I need to do sudo mount -a
.
I've tried several different ways to do this, but none worked. I need these folders to be mounted before any user logs in.
What am I doing wrong?
To summarise this question: is there any way to mount without being in the sudoers?
I finally found the solution:
I created a task in the session applications
bash /home/MYUSER/montar.sh
And in my montar.sh file, I added the lines
echo "MYPASS" | sudo -S sleep 10 && sudo mount -a -S
Probably not the best solution or the most correct, but it worked.
Sorry for English