HowTo: Auto Mounting Samba Shares Using AutoFS
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Hi,
I've followed this HowTo and everything was working fine. However, recently I no longer have write permissions to my autofs mounted samba shares.
I can write to them if I navigate via the network, so I don't think it's the NAS, but the autofs folders are read only.
Can anyone help?
I've followed this HowTo and everything was working fine. However, recently I no longer have write permissions to my autofs mounted samba shares.
I can write to them if I navigate via the network, so I don't think it's the NAS, but the autofs folders are read only.
Can anyone help?
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Unless you changed your mount instructions I don't know of any changes to autofs itself.
Would you post the map file please:
And what desktop environment are you using. The reason I ask is that there is a known issue with thunar in XFCE and AutoFS.
Would you post the map file please:
Code: Select all
cat /etc/auto.sambashares
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Here you go:
...and I'm using cinnamon
Code: Select all
Music.freencloud -fstype=cifs,rw,credentials=/home/freen/.smbcredentials,iocharset=utf8 ://freencloud.local/music
Movies.freencloud -fstype=cifs,rw,credentials=/home/freen/.smbcredentials,iocharset=utf8 ://freencloud.local/movies
Backup.freencloud -fstype=cifs,rw,credentials=/home/freen/.smbcredentials,iocharset=utf8 ://freencloud.local/freenbackup
Pictures.freencloud -fstype=cifs,rw,credentials=/home/freen/.smbcredentials,iocharset=utf8 ://freencloud.local/pictures
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Change the first line from this:
And see if that fixes it for that particular mount.
If it does then add the uid option to all your mount expressions.
To this:Music.freencloud -fstype=cifs,rw,credentials=/home/freen/.smbcredentials,iocharset=utf8 ://freencloud.local/music
Then restart autofs:Music.freencloud -fstype=cifs,rw,credentials=/home/freen/.smbcredentials,uid=freen,iocharset=utf8 ://freencloud.local/music
Code: Select all
sudo service autofs restart
If it does then add the uid option to all your mount expressions.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Hi altair4.
Thanks for that. It worked!
Thanks for that. It worked!
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
I'm having some problems with autofs when logging in.
My NAS spins down the disks when they aren't used.
When logging into my user in Mint the desktop only will load when the mounts are connected, which takes about 15 seconds because the NAS needs the spin up the disks.
Normally the login takes like 2 seconds.
Can I fix this in some way?
My NAS spins down the disks when they aren't used.
When logging into my user in Mint the desktop only will load when the mounts are connected, which takes about 15 seconds because the NAS needs the spin up the disks.
Normally the login takes like 2 seconds.
Can I fix this in some way?
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
I have never had to deal with that use case so I'm not sure how to resolve that issue. I don't think that you can fix that through AutoFS itself or even though Linux itself but I'm just not sure.tomsey wrote:I'm having some problems with autofs when logging in.
My NAS spins down the disks when they aren't used.
When logging into my user in Mint the desktop only will load when the mounts are connected, which takes about 15 seconds because the NAS needs the spin up the disks.
Normally the login takes like 2 seconds.
Can I fix this in some way?
Does the NAS device itself have a control for that?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Thank you for this clear guide, worked well with unRAID shares!
The only minor issue I found is that though mount -command from CLI doesn't require a password, the shares would auto mount only after I added the password to the auto.sambashares file - with a blank (space) password they didn't mount.
The only minor issue I found is that though mount -command from CLI doesn't require a password, the shares would auto mount only after I added the password to the auto.sambashares file - with a blank (space) password they didn't mount.
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
Thanks for this tutorial, it works great on Linux Mint 17.2 for syncing a KeePass database from an OpenWRT SMB share.
-
- Level 3
- Posts: 140
- Joined: Wed Jun 15, 2016 4:50 pm
Re: HowTo: Auto Mounting Samba Shares Using AutoFS
I know this is an old post but it is still relevant, very informative and exactly what I needed to know.
Yes I did google for this information but did not find the concise explanation here.
Thanks again altair4.
EDIT: As I maintain multiple systems this solution is better for me than viewtopic.php?f=42&t=144997.
I feel safer modifying the /etc/auto.[your_name_here] files than the /etc/fstab files. If I do something stupid in the fstab the system may not boot.
Yes I did google for this information but did not find the concise explanation here.
Thanks again altair4.
EDIT: As I maintain multiple systems this solution is better for me than viewtopic.php?f=42&t=144997.
I feel safer modifying the /etc/auto.[your_name_here] files than the /etc/fstab files. If I do something stupid in the fstab the system may not boot.