FreeKB - 0 Resolve error "Mount Error(13) Permission Denied"
Resolve error "Mount Error(13) Permission Denied"

This error appears when using the mount command in Linux.

[root@server1 ~]# mount -t cifs // /home/user1/Pictures -o user=john.doe,password=JohnsPassword
mount error(13): Permission denied



If the share is on a remote Linux machine is a Samba share and the /etc/samba/smb.conf file has security = user and passdb backend = tdbsam, an SMB username and password will need to be used in the mount command.

security = user
passdb backend = tbdsam


On the Samba server, the smbpasswd command is used to create a SMB username and password. Run the smbpasswd command as root.

[root@server1 ~]# smbpasswd -a JohnDoe
SMB Password: *********
Retype SMB Password: ********


The SMB username and password are stored in the /var/lib/samba/private/passdb.tdb file on the Samba server. Tdb tools can be installed so that you can read the passdb.tdb file.

[root@server1 ~]# yum install tdb-tools


tdbdump can be used to read the passdb.tdb file. In this example, we can see that the Samba username is john.doe. The Samba password is encrypted, thus the plain text password will not be displayed.

[root@server1 ~]# tdbdump /var/lib/samba/private/passdb.tdb
key(15) = "USER_john.doe\00"
. . .


It is important to recognize the you need to use the username and password of the Samba account on the remote computer, not the local computer. Also, the remote computer must be configured to share the remote directory.


Active Directory

If the /etc/samba/smb.conf file has security = ADS and realm = and password server =, use a username and password of an Active Directory account that is a member of the Administrators group.

security = ADS
realm =
password server =


In the mount command, the domain name will be the name of the realm in the /etc/samba/smb.conf file.

mount -t cifs // /mnt/example -o username=example,password=example,


If mount error(13) still appears, check /var/log/syslog on the client computer. Following is an example of CIFS errors in syslog.

Mar  5 20:33:36 mint kernel: [18531.540452] CIFS VFS: Error connecting to socket. Aborting operation.
Mar  5 20:33:36 mint kernel: [18531.540676] CIFS VFS: cifs_mount failed w/return code = -113
Mar  5 20:33:36 mint kernel: [18531.775350] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Mar  5 20:33:36 mint kernel: [18531.775361] CIFS VFS: Send error in SessSetup = -13
Mar  5 20:33:36 mint kernel: [18531.775550] CIFS VFS: cifs_mount failed w/return code = -13


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 95a01 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |