Mounting CIFS share with Windows Permissions in Ubuntu

Status
Not open for further replies.

rdybro

Dabbler
Joined
Nov 3, 2015
Messages
32
Hi everyone :)

I am in honest doubt wether this at all is a FreeNAS or a Ubuntu-question, and wether it belongs here (User Authentication) or in Sharing, so please bear with me here :)

I have joined my FreeNAS to my Windows domain. From my Windows PCs and servers I can easily connect to my shares, setup with Windows permissions.

But if I try to map a share in my Ubuntu server, it gives me logon failure.

This is what it says in the console when adding using mount.cifs or mount -t cifs:

mount error(13): Permission denied

This is what is in the syslog:

kernel: [204866.829700] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
kernel: [204866.829706] CIFS VFS: Send error in SessSetup = -13
kernel: [204866.830221] CIFS VFS: cifs_mount failed w/return code = -13

Is this because I have to join my Ubuntu to the domain also? Or can I somehow get around this? I have searched on Google a lot, but with no results. I hope someone can guide me in the right direction.

Thank you, regards :)
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I am in honest doubt wether this at all is a FreeNAS or a Ubuntu-question, and wether it belongs here (User Authentication) or in Sharing, so please bear with me here :)

I have joined my FreeNAS to my Windows domain. From my Windows PCs and servers I can easily connect to my shares, setup with Windows permissions.

But if I try to map a share in my Ubuntu server, it gives me logon failure.
The statement highlighted in red says to me that this would be a Ubuntu/Linux issue and would
best be solved by a visit to the Ubuntu forums with some search attempts there.
Googling this issue turned up this.
https://wiki.ubuntu.com/MountWindowsSharesPermanently
Hope that helps...
 

rdybro

Dabbler
Joined
Nov 3, 2015
Messages
32
The statement highlighted in red says to me that this would be a Ubuntu/Linux issue and would
best be solved by a visit to the Ubuntu forums with some search attempts there.
Googling this issue turned up this.
https://wiki.ubuntu.com/MountWindowsSharesPermanently
Hope that helps...

I have actually looked at that exact site several times.

My current line in /etc/fstab looks like this:

//hostname/sharename /mnt/folder cifs credentials=/home/username/.smbcredentials 0 0

My credentials file contains username, password and domain. I have tried with the uid and gid options too in the line in fstab but removed them to limit error sources.

As told I have tried with both mount.cifs and mount -t cifs with the exact same result.
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Sorry I couldn't be more helpful :(
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I have no problem connecting to a domain-joined FreeNAS server from a Centos 6.7 box (not joined to the domain). I script it rather than modifying /etc/fstab.
My credentials file consists of the following
Code:
username=Kung
password=Pa$$w0rd1 #the $ and numbers make it more hacker-proof
domain=FOO.COM


The mount.cifs command I use looks like this
Code:
mount.cifs -o credentials=/path/to/my/credentials.txt "//192.168.42.42/LIFE ANSWERS" /mnt/FreeNAS/LIFE_ANSWERS

or to put it differently
Code:
mount.cifs -o credentials=<path to credentials> "//<ip-address>/<share name>" <local mount point>
 

rdybro

Dabbler
Joined
Nov 3, 2015
Messages
32
I have no problem connecting to a domain-joined FreeNAS server from a Centos 6.7 box (not joined to the domain). I script it rather than modifying /etc/fstab.
My credentials file consists of the following
Code:
username=Kung
password=Pa$$w0rd1 #the $ and numbers make it more hacker-proof
domain=FOO.COM


The mount.cifs command I use looks like this
Code:
mount.cifs -o credentials=/path/to/my/credentials.txt "//192.168.42.42/LIFE ANSWERS" /mnt/FreeNAS/LIFE_ANSWERS

or to put it differently
Code:
mount.cifs -o credentials=<path to credentials> "//<ip-address>/<share name>" <local mount point>

This is pretty much exactly what I do - just in the fstab, which shouldn't make any differences - and if I run it as a command I get the same result.

I have tried making a share on a Windows machine, and this works fine to the very same Linux machine. Furthermore the share permissions from FreeNAS works fine on my Windows computer.
 
Status
Not open for further replies.
Top