Mount_smbfs Mount Error Authentication Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings smbutil server rejected the authentication authentication error and policies of this site About Us Learn more about Stack Overflow
Mount_smbfs: Server Connection Failed: No Route To Host
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Mount_smbfs Unknown Error
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Jenkins call to mount_smbfs fails with Authentication error up vote 4 down vote favorite 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. osx jenkins mount samba share|improve this question asked Jan 4 '13 at 18:13 MarkMizuguchi 212 The relevant apple info at support.apple.com/kb/HT1568 unfortunately does not have a pointer to a bugreport and changerequest database (which most monopolist like Apple, Samsung and Microsoft seem to find a bad idea). Hopefully Mac OS 10.9 will have a better SAMBA implementation. –Wolfgang Fahl Oct 5 '13 at 10:36 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote 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
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like http://stackoverflow.com/questions/14162548/jenkins-call-to-mount-smbfs-fails-with-authentication-error you, helping each other. Join them; it only takes a minute: Sign up getting authentication error on mount_smbfs up vote 1 down vote favorite I am trying to copy a file from MAC to windows using mount_smbfs. However, I am getting an authentication error. It says "server rejected connection: authentication error". I am writing the correct username http://stackoverflow.com/questions/14122623/getting-authentication-error-on-mount-smbfs and password but the problem did not change. Here is my code below. NSTask* task = [[NSTask alloc] init]; [task setLaunchPath:@"/sbin/mount_smbfs"]; [task setArguments:[NSArray arrayWithObjects:@"//user:50000@smb://192.168.2.1/Share",@"/Users/Shared", nil]]; [task launch]; Could you please help how can I solve this problem? objective-c osx cocoa authentication mount share|improve this question edited Jan 2 '13 at 13:56 asked Jan 2 '13 at 13:06 answer88 80216 Probably unrelated, but shouldn't there be an initial slash in @"Users/Shared" ? –Martin R Jan 2 '13 at 13:50 @MartinR I edited my code in my original code there is an initial slash you are right! –answer88 Jan 2 '13 at 13:56 While there is code here, this question is not really a programming question, but rather about how correctly to use mount_smbfs. That makes it a better fit for apple.se or superuser. –paulmelnikow Jan 3 '13 at 5:58 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote From this page - you need to specify the
to go to Finder and manually mounting it each time! After a couple of times of mounting and unmounting the drive http://www.markhneedham.com/blog/2011/01/15/mount_smbfs-mount-error-file-exists/ I ended up with this error: > mount_smbfs //mneedham@punedc02/shared punedc02_shared/ mount_smbfs: mount error: /Volumes/punedc02_shared: File exists I originally thought the ‘file exists' part of the message was suggesting that I'd already mounted a share on ‘punedc02_shared' but calling the ‘umount' command led to the following error: > umount punedc02_shared umount: punedc02_shared: not currently mounted I had authentication error actually absent mindedly gone and mounted the drive elsewhere through Finder which I only realised after reading Victor's comments on this post. Make sure that you already do not have the same share mounted on your Mac. I had //host/share already mounted in /Volumes/share, so when I tried to mount //host/share to /Volumes/newshare it gave me mount_smbfs mount error the “file exists” error. I learnt, thanks to the unix.com forums, that you can see which devices are mounted by using ‘df'. This is where Finder had mounted the drive for me: > df Filesystem 512-blocks Used Available Capacity Mounted on ... //mneedham@punedc02/shared 209696376 199773696 9922680 96% /Volumes/shared Since the shared drive gets unmounted when I disconnect from the network I decided to write a shell script that would set it up for me again. #!/bin/sh function mount_drive { mkdir -p $2 mount_smbfs $1 $2 } drives_to_unmount=`df | awk '/mneedham@punedc02/ { print $6 }'` if [ "$drives_to_unmount" != "" ]; then echo "Unmounting existing drives on punedc02: \n$drives_to_unmount" umount $drives_to_unmount fi mount_drive //mneedham@punedc02/media /Volumes/punedc02_media mount_drive //mneedham@punedc02/shared /Volumes/punedc02_shared At the moment I've just put that in ‘/usr/bin' so that it's available on the path. If there's a better way to do this or a way to simplify the code please let me know. I did come across a few ways to do the mo