Comments (9)
YES now it works
Thanks
from automount.
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.
I'll take a look and post back
Thank you
from automount.
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.
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.
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.
Would you please try v0.90.19 from dev-branch if this error is fixed?
from automount.
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.
You're welcome :)
from automount.
Related Issues (12)
- Understanding the configuration HOT 3
- Any issues with macOS High Sierra? HOT 1
- Expect scripts return exit code 0 even if command failed
- launchctl status code 1
- Mount commands in the script may need to be changed for Sierra 10.12.3 HOT 1
- macOS Sierra no longer has /Volumes as world writable HOT 9
- /usr/local/bin/automount.sh: line 346: Error Reading File: HOT 21
- Couple problems with ${USER}, ${HOME}, ${LOGINNAME}, etc. HOT 4
- automount triggered randomly HOT 9
- Line 284: declare: PPID: readonly variable HOT 1
- Need help HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automount.