I want to be able to mount our file server's file share (on a Mac OS X server, shared via AFP and Windows File Sharing) on my Ubuntu 10.10 linux laptop. I want to be able to mount it as my normal user, and be prompted for the password each time. What do I add to /etc/fstab to make this happen? I know I did it before, but I forgot how now.
EDIT: The share in question is called "G4 320", and I am trying the following line in fstab:
//server_ip/G4\040320 /media/G4/ cifs user,username=something 0 0
But I'm getting the following via dmesg:
CIFS VFS: cifs_mount failed w/return code = -6
EDIT2:
As requested, more debug info. Output of dmesg with my fstab line:
[151994.740138] CIFS VFS: cifs_mount failed w/return code = -6
[152007.760136] CIFS VFS: cifs_mount failed w/return code = -6
[152132.770147] CIFS VFS: cifs_mount failed w/return code = -6
[152221.700152] CIFS VFS: cifs_mount failed w/return code = -6
[152245.340132] CIFS VFS: cifs_mount failed w/return code = -6
Output of dmesg with the credentials line from Michael:
[153117.088656] CIFS VFS: No username specified
[153117.088668] CIFS VFS: cifs_mount failed w/return code = -22
[153164.358300] CIFS VFS: No username specified
[153164.358312] CIFS VFS: cifs_mount failed w/return code = -22
/var/log/messages seems to have no useful information.
EDIT3: OK. Thanks again to Michael I almost have it! If I put the following in /etc/fstab then it works:
//10.1.0.15/G4\040320H /media/G4 cifs user=AzureDiamond,password=hunter2 0 0
However:
- I do not want my password in there...
- I now need to use
sudoto mount the share.
How can I resolve those two issues?

!!Mapping smb error code 67 to POSIX err -6 !!– Tok Dec 15 '10 at 17:44dmesgoutput but/var/log/messageshas no relevant information... – Josh Dec 15 '10 at 17:50echo 1 >/proc/fs/cifs/cifsFYI– Tok Dec 15 '10 at 18:13