Mount or automount samba share

Category: Note to Self

Works with Fedora 16

From command line:

$ mount -t cifs -o user=lopez,password=mypassword  //192.168.1.13/path /mnt/share/mntpoint

If samba folder has a space in the name:

$ mount -t cifs -o user=lopez,password=mypassword  //192.168.1.13/"path with spaces" /mnt/share/mntpoint

Automount

edit /etc/fstab and add the following lines:

//192.168.1.13/my\path1 /mnt/share/mountpoint1  cifs  user=lopez,password=mypassword,uid=lopez,gid=users 0 0
//192.168.1.13//path\040space /mnt/share/mountpoint2  cifs  user=lopez,password=mypassword,uid=lopez,gid=users 0 0

(note use of \040 to escape space in fstab, rather than surrounding quotes used in command line)