Platinum Partner

Mounting A CIFS Share In Samba

This works in /etc/fstab:


//HOSTNAME.DOMAIN_NAME\SHARE$   /mnt    cifs    defaults        credentials=/root/.smbpasswd    0 0


where /root/.smbpasswd has:


domain=DOMAIN_NAME
username=mylogin
password=secret


If you get the syntax for the slashes in the name wrong it will complain with 'mount error 6 = No such device or address'
but samba is quite flexible in what syntax it lets you use:


# mount /mnt/
retrying with upper case share name
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

# mount -t cifs //10.11.12.13/SHARE /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,
retrying with upper case share name

mount.cifs kernel mount options unc=//10.11.12.13\SHARE,ip=10.11.12.13,pass=secret,ver=1,rw,user=mylogin,,,,,,,
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

# mount -t cifs "//10.11.12.13/SHARE$" /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE$,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,

# mount -t cifs //10.11.12.13/SHARE\$ /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE$,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,

# mount -t cifs //10.11.12.13\\SHARE$ /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE$,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,

# mount -t cifs \\\\10.11.12.13\\SHARE$ /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE$,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,

# umount /mnt/

# mount -t cifs '\\10.11.12.13\SHARE$' /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE$,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,

# mount -t cifs '\\10.11.12.13/SHARE$' /mnt --verbose -o "user=DOMAIN_NAME/mylogin"
parsing options: rw,user=DOMAIN_NAME/mylogin
Password:

mount.cifs kernel mount options unc=//10.11.12.13\SHARE$,ip=10.11.12.13,domain=DOMAIN_NAME,pass=secret,ver=1,rw,user=mylogin,,,,,,,
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}