Giter VIP home page Giter VIP logo

Comments (21)

gniemetz avatar gniemetz commented on June 18, 2024

Your it.niemetz.automount.plist has an error, the entry <key>Mountlist</key> is missing

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
       <key>Mountlist</key>
       <array>

from automount.

 avatar commented on June 18, 2024

Thanks! That solved the error.

Unfortunately, I'm still stuck:

I'm trying to mount shares from a Synology NAS, SMB and AFP enabled and working well connecting manually. I think I have the syntax in the plist wrong?

bash-3.2$ /usr/local/bin/automount.sh -m
getPasswordFromKeychain failed (RC=44)
mount of repository failed (RC=64, RV=mount_smbfs: URL parsing failed, please correct the URL and try again: Invalid argument)
automount runned with errors.

My .plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Mountlist</key>
	<array>
		<dict>
			<key>Protocol</key>
			<string>smb</string>
			<key>Account</key>
			<string>sadrian</string>
			<key>Server</key>
			<string>192.168.0.100</string>
			<key>Share</key>
			<string>repository</string>
		</dict>
	</array>
</dict>
</plist>

from automount.

 avatar commented on June 18, 2024

This works in terminal ...

mount_smbfs //[email protected]/repository ~/Volumes/repository

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

The function getPasswordFromKeychain returns with an error, your keychain entry for this server is missing
Add the entry with calling
/usr/local/bin/automount.sh --addpassword --server=192.168.0.100 --protocol=smb

from automount.

 avatar commented on June 18, 2024

Getting closer. Password is added. Mounting still fails:

bash-3.2$ /usr/local/bin/automount.sh --addpassword --server=192.168.0.100 --protocol=smb
Password: successfully added password to keychain.

bash-3.2$ /usr/local/bin/automount.sh -m
mount of repository failed (RC=64, RV=mount_smbfs: URL parsing failed, please correct the URL and try again: Invalid argument)

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

Please turn on debugging again and post the results, but don't forget to clear out the password

from automount.

 avatar commented on June 18, 2024

automount_debug_02.txt

Thanks for the reminder! 🙂

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

Do you have any special characters in your password, eg. colons, slashes, double quotes, single quotes etc.?
This could be the problem

from automount.

 avatar commented on June 18, 2024

Indeed! Spaces, slashes and punctuation marks. I will try to set the password again and escape the special characters tonight. I report back later.

Thanks for your help so far!

from automount.

 avatar commented on June 18, 2024

Yes! Thank you Gerd!

First try in escaping the special characters didn't work – then I tried %20 for the spaces.

bash-3.2$ /usr/local/bin/automount.sh -m
repository mounted successfully
automount runned successfully.

Thank you for helping me through this!
May I spread the word about auto mount?

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

I will take a look at the function getPasswordFromKeychain, maybe i can escape the password

Thank you!

from automount.

 avatar commented on June 18, 2024

If I may ask one more time ...

I now tried installing on my second mac. I died everything as before, set the same password and now the script terminates with

bash-3.2$ /usr/local/bin/automount.sh -m
/Users/sadrian/Library/Preferences/it.niemetz.automount.plist or /Users/sadrian/Library/Keychains/login.keychain are missing
bash-3.2$ chown ${USER}:staff /usr/local/bin/automount.sh 

I checked twice for the scripts being in place and rights/ownership set correctly.
login.keychain-db is present in ~/Library/Keychains.

Verbose output is attached as .txt.
automount_debug.txt

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

As stated, /Users/sadrian/Library/Preferences/it.niemetz.automount.plist and/or /Users/sadrian/Library/Keychains/login.keychain are missing/empty/unreadable
Check with
ls -lisa /Users/sadrian/Library/Keychains/login.keychain
and
ls -lisa /Users/sadrian/Library/Preferences/it.niemetz.automount.plist
for readability and that the files are not empty

from automount.

 avatar commented on June 18, 2024

login.keychain doesn't exist. Only login.keychain-db.

How do I create that file?

from automount.

 avatar commented on June 18, 2024

Well, for a test I copied login.keychain from my second Mac over – it works! But I feel a little uncomfortable with this approach. Could you advise me on howto create the file the right way?

In addition, system.log shows the following:

Feb 16 14:33:34 *** com.apple.xpc.launchd[1] (it.niemetz.automount): The NetworkState key is no longer respected. Please remove it.
Feb 16 14:35:21 *** com.apple.xpc.launchd[1] (it.niemetz.automount): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

It seems that Apple changed the keychain file in macOS Sierra from login.keychain to login.keychain-db, if have to change my test
Sources:
http://apple.stackexchange.com/questions/255134/keychain-issues-after-sierra
https://www.quernus.co.uk/2016/10/10/ssh-keychain-changes-macos-sierra/
https://macadmins.slack.com/archives/security/p1478793222005994

from automount.

 avatar commented on June 18, 2024

If so, why would my other Mac have the old naming? Both machines run on Sierra, actual release and both are mostly stock configuration.

It works for me right now, but I hope you find the time to dig into this a little deeper. ;-)

Thanks again, Gerd!

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

Changed the test in dev-Branch version 0.90.7

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

Did you update one of the Mac's from an older release of OS X or is it a fresh installation?

from automount.

 avatar commented on June 18, 2024

0.90.7 works!

I replaced automount.sh and deleted login.keychain.

Both machines had a fresh install on 10.11. It might be, that I had 10.12-beta running on the iMac (the first one) but I'm not sure.

Nice – automounting back to normal with added functionality!

from automount.

gniemetz avatar gniemetz commented on June 18, 2024

Glad i could help

from automount.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.