Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mount.cifs Error 13

115 views
Skip to first unread message

Reynolds McClatchey

unread,
Nov 25, 2009, 4:55:15 PM11/25/09
to
mount.cifs started failing
"mount error 13 = Permission denied"
after the latest updates to CentOS5.1.

I usually chmod u+s /sbin/mount.cifs
when mount.cifs gets updated. But it fails
the same way as root with or without the suid bit.

I've been trying variations in /etc/fstab
and I am suspicious of the sec=ntlm entry, which I
never used before.

Here is an /etc/fstab line that stopped working.

//foo/documents /home/user/foo/documents cifs
noauto,users,rw,credentials=/home/user/.credentials 0 0

Thanks is Advance.

NMR User

unread,
Nov 26, 2009, 5:23:00 AM11/26/09
to

Take a look at this thread:

http://lists.centos.org/pipermail/centos/2009-November/084908.html

Recent samba update causes problems on some mounts due to the linefeed
character after the password in a credentials file. If you follow the
advice in:

http://lists.centos.org/pipermail/centos/2009-November/084913.html

You'll be able to mount the share with a credentials file again.

H

Reynolds McClatchey

unread,
Dec 1, 2009, 9:14:23 AM12/1/09
to

Thanks for the guidance. It worked.
I made sure there were no spaces around the equals; then
use tr and sed like:

cat oldcred.txt |tr "\n" '^' | sed '{s/y^/y\n/
s/5^/5/}' >.credentials

where the "y" is the last letter of the username
and 5 is end of the password. The lf is required
at the end of the username.

tr replaces lf with ^.
sed puts the first lf back and removes the last ^.

NMR User

unread,
Dec 16, 2009, 9:00:10 AM12/16/09
to
Reynolds McClatchey wrote:
>
> Thanks for the guidance. It worked.
> I made sure there were no spaces around the equals; then
> use tr and sed like:
>
> cat oldcred.txt |tr "\n" '^' | sed '{s/y^/y\n/
> s/5^/5/}' >.credentials
>
> where the "y" is the last letter of the username
> and 5 is end of the password. The lf is required
> at the end of the username.
>
> tr replaces lf with ^.
> sed puts the first lf back and removes the last ^.

Just to add that a patched version of samba (for RHEL 4 & 5) has now
been released, obviating the workaround.

H

0 new messages