Mount a network share with CIFS

For a one-off:

mount -t cifs //host_or_ip/share /mountpoint

And you'll probably need at least some of:

-o username=smbusername, password=smbpassword, iocharset=utf8,
 file_mode=0777, dir_mode=0777

If you want it automatic, add a line to /etc/fstab:

//netbiosname/share /mountpoint cifs
 username=smbusername,password=smbpassword,
 iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

(you could store the user/pass in a file and point credentials at it for better security)

Now try it out with sudo mount -a.

Posted 03 Aug 2007, tagged with shell