El SMB ha muerto, viva el CIFS: mount error 13 = Permission denied

Como ya he contado a menudo, en mi ordenador principal uso Debian Testing/Lenny, de forma que al mismo tiempo que puedo probar las últimos versiones de los paquetes, éstos me dan unos sustos espantosos que, a su vez, me sugieren interesantes temas a tratar como en el caso de hoy.

Veréis, yo tengo una línea en el fichero /etc/fstab para que al arrancar me monte automáticamente un directorio compartido por samba de otro sistema:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
[...]
//sistemaremoto/supercoco /mnt/sistemaremoto smbfs uid=supercoco,credentials=/etc/sistemaremotosmb 0 0

La opción credentials=/etc/sistemaremotosmb la uso para no tener la contraseña a usar tan visible. Usando un archivo diferente, le puedo poner permisos muy restrictivos. Es lo que aconseja la página de man de mount.smbfs

credentials=<filename>
specifies a file that contains a username and/or password. The for-
mat of the file is:

username = <value>
password = <value>

This is preferred over having passwords in plaintext in a shared
file, such as /etc/fstab. Be sure to protect any credentials file
properly.

Así que mi fichero /etc/sistemaremotosmb tenía este aspecto:

# cat /etc/sistemaremotosmb
username = supercoco
password = barriosesamo

# ll /etc/sistemaremotosmb
-rw------- 1 root root 38 2008-02-09 07:44 /etc/sistemaremotosmb

Pues bien, hace unos días actualicé los paquetes de Lenny/Testing y a continuación me encontré con el siguiente problema al intentar montar el directorio compartido:

# mount /mnt/sistemaremotosmb/
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

(more…)

Noticia original: Lo hice y lo entendí