It's a NAS device and a manual mount works fine even without reduced security (sec=ntlm) or an earlier smb dialect (vers=1.0).
But why does it work manually and not automatically?
It's a NAS device and a manual mount works fine even without reduced security (sec=ntlm) or an earlier smb dialect (vers=1.0).
But why does it work manually and not automatically?
The only difference between the manual cifs mount I suggested above and your autofs mount is the option nounix.
ata -fstype=cifs,rw,credentials=/home/ata/.smbcredentials,file_mode=0660,dir_mode=0770,uid=1000,nounix ://192.168.178.250/ata
Did you restart the autofs service? That is required with every config change. Also, the mount will only show up when requested. You need to ask for /nas/ata/ to get it mounted. Any request should work, open a terminal and do an ls /nas/ata/. That's one example. I don't know how to make it work using a file browser, since the 'ata' directory won't show up until requested.
There is an option to make available mounts "ghost" before they are mounted. This is specific to autofs.master and the line. --ghost is the option.
This should make using a file browser work, since the empty, unmounted, 'ata' will be there.Code:/nas /etc/auto.cifs-shares --timeout=60 --ghost
And don't forget to restart the autofs service after any config changes.
Last edited by TheFu; September 30th, 2018 at 04:39 PM.
Yes.
ls /nas/ata/ does work, but I want to use this share with GUI applications.
Great! The parameter --timeout=60 --ghost solved the problem.
I've tested it with different GUI applications each after a reboot.
I will never forget it (again).
Summary
1. I've created the new directory /nas on my machine.
2. Then I've created the new credentials file /home/ata/.smbcredentials:3. Then I added the following line to /etc/auto.master:Code:username=<my_username_on_NAS> password=<my_password_on_NAS>
4. Then I changed /etc/auto.cifs-shares to this:Code:/nas /etc/auto.cifs-shares --timeout=60 --ghost
Code:ata -fstype=cifs,rw,credentials=/home/ata/.smbcredentials,file_mode=0660,dir_mode=0770,uid=1000 ://192.168.178.250/ata
Last edited by Atalanttore; October 3rd, 2018 at 04:40 PM. Reason: Simplificated my summary
Very nice summary! Please mark the thread as SOLVED - thread tools, near the top.
Yes, you will. We all do. And in another 20 yrs, it will still happen even when you know better.I will never forget it (again).
BTW, I really like your /nas mount name.
I did the summary for other users, because as mentioned in comment #13 before, autofs is not intuitive at all, but fortunately you only have to do the setup once.
I called the mount point /nas, because my file server is a NAS.
Today, I set up the same Samba mount point like described here on another Notebook running Ubuntu 18.04 and add a second mount point for another directory on my NAS.
For the second mount point I've added a second line to /etc/auto.cifs-shares:
Unfortunately it doesn't work like this. No share is mounted at all.Code:ata -fstype=cifs,rw,credentials=/home/ata/.smbcredentials,file_mode=0660,dir_mode=0770,uid=1000 ://192.168.178.250/ata public -fstype=cifs,rw,credentials=/home/ata/.smbcredentials,file_mode=0660,dir_mode=0770,uid=1000 ://192.168.178.250/public
Bookmarks