Giter VIP home page Giter VIP logo

Comments (9)

RiccardoSaettone avatar RiccardoSaettone commented on September 11, 2024 1

YES now it works
Thanks

from automount.

RiccardoSaettone avatar RiccardoSaettone commented on September 11, 2024

I think that this can help you:

I found that if i try to mount the NAS in terminal in must change the \ between Domain and username with a ;
practically
mount_smbfs -o soft,nodev,nosuid 'smb://myDomain\ myUsername@myNAS/TEST' /Users/*******/Volumes/TEST
DOESN'T WORK

But if i change myDomain\myUsername with myDomain;myUsername
mount_smbfs -o soft,nodev,nosuid 'smb://myDomain;myUsername@myNAS/TEST /Users/*******/Volumes/TEST
everything works correctly

So i change my .plist Account string from:
myDomain\myUsername
to
myDomain;myUsername

and add a new keychain entry

/usr/local/bin/automount.sh --addpassword --account='myDomain;myUsername' --server=myNAS --protocol=smb

The ' ' in the --account are mandatory otherwise the character ; will not be accepted

Now all works.

from automount.

gniemetz avatar gniemetz commented on September 11, 2024

I'll take a look and post back

Thank you

from automount.

RiccardoSaettone avatar RiccardoSaettone commented on September 11, 2024

I test the last version 0.90.18, but doesn't work
the password is taken correctly from the keychain, and also the domain an the username from del .plst file, but when the script end I have this error in the log

sudo /usr/local/bin/automount.sh -m
mount of MYSHARE failed (RC=1, RV=)
automount runned with errors.
and the volume is not mounted

This is a extract of the debug, I hope this can help

+++(/usr/local/bin/automount.sh:416): getPasswordFromKeychain(): security find-internet-password -w -r 'smb ' -a MYUSER -l MYNAS -j automount /Users/MACUSER/Library/Keychains/login.keychain-db +++(/usr/local/bin/automount.sh:425): getPasswordFromKeychain(): _RC=0 +++(/usr/local/bin/automount.sh:427): getPasswordFromKeychain(): '[' 0 -ne 0 ']' +++(/usr/local/bin/automount.sh:430): getPasswordFromKeychain(): return 0 ++(/usr/local/bin/automount.sh:710): processMountlist(): launchctl asuser 501 chroot -u 501 -g 20 / expect -c ' set timeout 30 log_user 1 spawn /sbin/mount_smbfs -o soft,nodev,nosuid //MYNAS/MYSHARE /Users/MACUSER/Volumes/MYSHARE expect { "ser:" { if {"MYNAS" == ""} { send -- “MYNASUSER\r” } else { send -- “MYDOMAIN;MYNASUSER\r" } exp_continue } "sword:" { send -- “MYPASSWORD\r” exp_continue } timeout { exit 1 } eof { return } } catch wait result exit [lindex $result 3]' +(/usr/local/bin/automount.sh:710): processMountlist(): _RV='spawn /sbin/mount_smbfs -o soft,nodev,nosuid //MYNAS/MYSHARE /Users/MACUSER/Volumes/MYSHARE Password for MYNAS: ' +(/usr/local/bin/automount.sh:711): processMountlist(): _RC=1 +(/usr/local/bin/automount.sh:740): processMountlist(): '[' 1 -eq 0 ']' +(/usr/local/bin/automount.sh:744): processMountlist(): log --priority=3 'mount of MYSHARE failed (RC=1, RV=spawn /sbin/mount_smbfs -o soft,nodev,nosuid //MYNAS/MYSHARE /Users/MACUSER/Volumes/MYSHARE Password for MYNAS: )'

from automount.

gniemetz avatar gniemetz commented on September 11, 2024

It looks like you don't get asked about the user, only the password. Try to mount the filesystem manually as stated in the log: /sbin/mount_smbfs -o soft,nodev,nosuid //MYNAS/MYSHARE /Users/MACUSER/Volumes/MYSHARE and look at the response you get from the command. It should ask for a user (expect "ser:") and for the password (expect "sword:")

from automount.

RiccardoSaettone avatar RiccardoSaettone commented on September 11, 2024

I tried, and you're right, it asks me only the password:

/sbin/mount_smbfs -o soft,nodev,nosuid //MYNAS/MYSHARE /Users/MACUSER/Volumes/MYSHARE

Password for MyNAS:

"Password for MyNAS:" is exactly what is written on the terminal when it asks me for the password

after entering the password the shared folder is mounted correctly

from automount.

gniemetz avatar gniemetz commented on September 11, 2024

Would you please try v0.90.19 from dev-branch if this error is fixed?

from automount.

RiccardoSaettone avatar RiccardoSaettone commented on September 11, 2024

I tried, but don't work.
When the script end I don't have error:

MYSHARE mounted successfully All shares mountd successfully.

But the shared folder are not mount.

This is a part of the debug log:
I think that the there aren't ' ' at the start ed at the end of MYDOMAIN;MYNASUSER'

					set timeout 30
					log_user 1
					spawn /sbin/mount_smbfs -o soft,nodev,nosuid //MYDOMAIN;MYNASUSER@MYNAS/MYSHARE /Users/MYMACUSER/Volumes/MYSHARE
					expect {
						-re "..*ser.*|.*name.*" {
							if {"MYNAS" == ""} {
								send -- "MYNASUSER\r"
							} else {
								send -- "MYDOMAIN;MYNASUSER\r"
							}
							exp_continue
						}
						-re ".*ssword.*" {
							send -- “*****************r”
							IN the place of the * There are something like \x00\x25\x54 the password converted in ex code i think
							exp_continue
						}
						timeout {
							exit 1
						}
						eof {
							return
						}
					}
					catch wait result
					exit [lindex $result 3]'
+(/usr/local/bin/automount.sh:710): processMountlist(): _RV='spawn /sbin/mount_smbfs -o soft,nodev,nosuid //MYDOMAIN
invalid command name "MYNASUSER@MYNAS/MYSHARE"
    while executing
'MYNASUSER@MYNAS/MYSHARE /Users/MYMACUSER/Volumes/MYSHARE"

from automount.

gniemetz avatar gniemetz commented on September 11, 2024

You're welcome :)

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.