我在 Mac OS X 10.7.5 上运行 Jenkins,并让它在 Windows 服务器上处理夜间备份到 SMB 共享。我想将 SMB 驱动器作为备份脚本的一部分自动挂载,但 Jenkins 中的 mount_smbfs 失败。我使用的 mount 命令的形式是:
mount_smbfs "//WORKGROUP;user:password@server/share" /Users/user/share
这在终端命令行中工作正常,但在 Jenkins 中给了我错误:
mount_smbfs: server rejected the connection: Authentication error
我已确保 Jenkins 以与命令行上相同的用户身份运行该命令,并且在 PATH 和其他环境变量中没有任何区别。
最佳答案
这还不是一个完整的答案 - 只是与诊断相关的信息列表。如果您找到任何适当的治疗方法,请编辑此答案。
以下是一些相关的 Apple 支持文章:
这些是手册页
你可能想试试
smbutil 查看 "/WORKGROUP;user:password@server"
检查服务器的可用性。
mount_smbfs 命令的 -N 选项有利于自动化登录过程
-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.
还有关于明文或加密密码的问题,请访问:
关于macos - Jenkins 调用 mount_smbfs 失败并出现身份验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14162548/