Page 1 of 1

SOLVED: mount_shares_locally Script Isn't Working

Posted: Sun Dec 06, 2020 8:10 pm
by ksburgess
I'm not sure why this stopped working, but the script isn't executing properly. I went through the walkthrough here:

https://wiki.amahi.org/index.php/Mount_Shares_Locally

And removed the script and re-installed but to no avail.

I *can* mount the shares manually using this command or similar:

Code: Select all

sudo mount -t cifs -o username=ksburgess //192.168.0.10/Books /mnt/samba/Books


(after manually creating the directory)

A couple of weeks ago one of my Windows machines stopped being able to access shares. I tried a bunch of different things, and finally resetting my user's password and re-defining the Samba password for that user worked to get the Windows box connecting again. I figured that out just a few nights ago, so it's possible the mount_shares_locally script stopped working after that.

But when I re-set the script, I also redefined the .smb_credentials to match (and maybe I should have done this first off but I didn't really realize all that was going on until trying to walk back through configuration). So I think all the credentials are correct. I'm not sure why it's not working for me. I cleared it off, set it back up, and I've rebooted several times.

What should I do next to troubleshoot?

Re: mount_shares_locally Script Isn't Working

Posted: Sun Dec 06, 2020 10:04 pm
by bigfoot65
Did you update the user name in the mount_shares_locally script to match?

Re: mount_shares_locally Script Isn't Working

Posted: Mon Dec 07, 2020 4:52 am
by ksburgess
Yes, it's set to my first admin user (me).

Re: mount_shares_locally Script Isn't Working

Posted: Mon Dec 07, 2020 8:10 am
by bigfoot65
Let's take this in steps.

Suggest you double check that the credentials in the mount_shares_locally script and .smb_credentials in your admin user home directory match.

Next, if the script is running, stop it. Then remove the /mnt/samba directory.

Finally, try restarting the script.

If all goes well, things should start working.

Re: mount_shares_locally Script Isn't Working

Posted: Mon Dec 07, 2020 8:07 pm
by ksburgess
Okay in the mount_shares_locally script I set my username to my first admin user (which is my username) on line 12.

On line 25, I changed the password to "hda" - I don't believe I ever changed the default password for MariaDB...

So currently this is how that line reads:

Code: Select all

mysql -u amahihda -p hda -e "select name from shares" hda_production | grep -v "^name$" | xargs -d "\n" mkdir -p
The .smb_credentials file has only three lines - the first is my user's username, the second is my user's password, and the third is our domain (BURGESSNET)

I did as you suggested and stopped the script, removed the /mnt/samba directory, and restarted the script. I'm still not getting any shares showing up in /mnt/samba

Re: mount_shares_locally Script Isn't Working

Posted: Mon Dec 07, 2020 8:47 pm
by bigfoot65
On line 25, I changed the password to "hda" - I don't believe I ever changed the default password for MariaDB.
That password is incorrect for the user listed. Need to leave the password that was in the original script as it's correct.

Re: mount_shares_locally Script Isn't Working

Posted: Wed Dec 09, 2020 3:15 pm
by ksburgess
Okay that seems to have worked ^.^ The wording on the wiki page is a little confusing and made it sound like I needed to use the password listed in the page linked to that bullet point ("Please see Database Root Password for the appropriate login password.")

But all seems to be working now, thank you so much!

Re: mount_shares_locally Script Isn't Working

Posted: Wed Dec 09, 2020 4:00 pm
by bigfoot65
Glad it’s working.

I’ll check out that piece in the wiki and try to make it clearer.

Marking as resolved.