I am running Jenkins on Mac OS X 10.7.5 and have it handle nightly backup to a SMB share on a Windows server. I want to mount the SMB drive automatically as part of the backup script but mount_smbfs fails from within Jenkins. The mount command I use is of the form:
mount_smbfs "//WORKGROUP;user:password@server/share" /Users/user/share
This works fine from the Terminal command line but in Jenkins gives me the error:
mount_smbfs: server rejected the connection: Authentication error
I have made sure that Jenkins runs the command as the same user as on the command line and nothing stood out in the differences in the PATH and other environment variables.
This is not a complete answer yet - just a list of information relevant for the diagnosis. Please edit this answer if you find any proper therapy.
Here are some relevant Apple support articles:
and these are the man pages
You might want to try out smbutil view "/WORKGROUP;user:password@server"
to check the availabilty of the server.
the -N option of the mount_smbfs command is good for automating the login process
-N Do not ask for a password. At run time, mount_smbfs reads the
~/Library/Preferences/nsmb.conf file for additional configuration parameters
and a password. If no password is found, mount_smbfs prompts for it.
There is also the question of plaintext or encrypted passwords addressed at:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With