1

Automounting not working correctly for CIFS shares; weird results

Base on the above question, my issue is that my samba/cifs password do have '*' and '&' characters which point me to the lines:

if [ -e "$credfile" ] then opts=$opts",credentials=$credfile" smbclientopts="-A "$credfile 

what would be the correct way to escape the password? in the credfile

username='user' password='*pass&word?Secure' 

this way fail

username=user password=\*pass\&word\?Secure 

or fix the " smbclientopts="-A "$credfile "

thanks for the comments.

2020 update: clean pop-os install

> apt install samba autofs smbclient > sudo nano /etc/creds/<<host>> > sudo chmod rw-r-r /etc/creds/<<host>> > sudo nano /etc/auto.master ###edit: /smb auto.smb --timeout=300 > sudo systemctl restart autofs.service 

results:

> the ls /smb/<<host>> show all the shares > but ls /smb/<<host>>/<<share>> > ls -l /smb/ccollart/home > ls: cannot open directory '/smb/ccollart/home': No such file or directory 

syslog:

> Feb 5 11:26:33 pop-os kernel: [10292.285802] CIFS: Attempting to mount //ccollart/home > Feb 5 11:26:33 pop-os kernel: [10292.285816] Unable to determine destination address. 

I then install winbind:

sudo apt install libnss-winbind winbind

BTW, my local DNS do add searchdomain = localdomain and DNS do resolve IPv4 both "host" and "host.localdomain"

1
  • How did come to the conclusion that the linked question (closed without a resolution) references special characters in the credentials file? I have a few in mine (not yours, in particular) and didn't need to escape them. Commented Nov 9, 2019 at 17:23

1 Answer 1

1

my solution was to install CIFS-UTILS,because the FS type is opts="-fstype=cifs"

sudo apt install cifs-utils

but most of the tutorials that I follow doesn't include this step,maybe

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.