G+_Hagos Rush Posted May 2, 2017 Share Posted May 2, 2017 Calling all command line Genius' Attempting to mount an afp share from a Mac to ubuntu (running in VM). I have mapped the Mac (external) drive to a folder on the machine. It will not however allow me to mount it. In the sidebar I see "minishare" - when I click on it it states "Only root can mount afp://172.16.28.6 on /media/minishare Everything I did was utilizing sudo My command stored in fstab/ afp://172.16.28.6 /media/minishare cifs credentials=/home/ubuadmin/.smbcredentials, iocharset=utf8,gid=1000,uid=1000,file_mode0777,dir_mode=0777 0 0 when I: "sudo mount -a" I get: mount.cifs: bad UNC (afp://172.16.28.6) Link to comment Share on other sites More sharing options...
G+_Stephen Bertoni Posted May 3, 2017 Share Posted May 3, 2017 CIFS is Windows style file sharing. afp is Apple. That's the cause of the error from "mount.cifs". Is there a reason you're using afp? Even OS X I believe defaults to Windows/SMB sharing these days. Try replacing afp:// with smb:// in your /etc/fstab Link to comment Share on other sites More sharing options...
G+_Hagos Rush Posted May 3, 2017 Author Share Posted May 3, 2017 Thanks for responding. OS X by defaults turns Windows sharing off and when you turn it on it OS X tells you that there is a security risk blah blah blah. I don't mind doing WFS, do I need to change the command to afp/smb/wfs instead of cifs? Also, with Ubuntu is there any reason I would use one over the other?Stephen Bertoni Link to comment Share on other sites More sharing options...
G+_Stephen Bertoni Posted May 3, 2017 Share Posted May 3, 2017 I don't think any of the Linuxes support afp by default any more. You'd have to install it yourself. Something like this in your /etc/fstab //server/share /mountpoint cifs guest 0 0 But I don't have any Windows machines around here to test that on so YMMV. Link to comment Share on other sites More sharing options...
G+_Hagos Rush Posted May 3, 2017 Author Share Posted May 3, 2017 okay - thanks ill try and see how well I get on. Thanks for your help Stephen Bertoni Link to comment Share on other sites More sharing options...
G+_Travis Hershberger Posted May 3, 2017 Share Posted May 3, 2017 Well, you're trying to use two different protocols in that fstab line, and one is in the wrong spot. Try: 172.16.28.6:/share/path /media/minishare cifs credentials=/home/ubuadmin/.smbcredentials,iocharset=utf8,file_mode0777,dir_mode=0777 0 0 Link to comment Share on other sites More sharing options...
G+_Hagos Rush Posted May 3, 2017 Author Share Posted May 3, 2017 Stephen Bertoni so here is the code that worked for me - mount.cifs //192.168.1.107/share1/ /mnt/shares/share1/ -o credentials=/home/user/filename also to auto mount I used: //192.168.1.129/share1 /mnt/shares/share1 cifs. credentials=/home/user/filename 0 0 YESSSS! something worked - been at this for like two days Link to comment Share on other sites More sharing options...
G+_Stephen Bertoni Posted May 3, 2017 Share Posted May 3, 2017 Windows shares should be addressable with a //server/share syntax. If you to use an IP address style syntax you'll want two slashes following the colon, like this 172.16.28.6://share Also, the "guest" option in /etc/fstab should allow you to access the share without a password. Link to comment Share on other sites More sharing options...
G+_Stephen Bertoni Posted May 3, 2017 Share Posted May 3, 2017 Cool Hagos Rush? glad it's working for you Link to comment Share on other sites More sharing options...
Recommended Posts