this post was submitted on 05 Nov 2024
14 points (93.8% liked)

homelab

6653 readers
15 users here now

founded 4 years ago
MODERATORS
 

I've managed to get TrueNAS connected to Active Directory and created a share that I can access from an AD account on a Windows client just fine. However when I try to mount the share on Ubuntu Server 24.04 I keep getting permission/logon failure.

In my fstab entry I've tried every combo I can think of.

domain=domain,user=user,password=pass domain=domain.local,user=user,password=pass user=domain\user,password=pass user=domain.local\user,password=pass

I've also tried a separate credentials file with every one of those combinations as well as versions 2.1 and 3.0. I've got no problem mounting shares from the Windows server without even specifying the domain.

At this point I'm pretty sure I'm missing a setting on TrueNAS but no idea what. Any ideas?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 3 weeks ago (4 children)

In FSTAB:

//192.168.188.52/media /home/shareuser/shared/ cifs vers=3.0,credentials=/home/shareuser/.smbcred,uid=1000,gid=1000,iocharset=utf8 0 0

In .smbcred are the credentials. The content of the file:

username=shareuser
password=shicjwvfiak                        domain=192.168.188.52

Should work.

Instead of the IP put the FQDN of your Share holding Server and make sure DNS is properly working.

[–] [email protected] 1 points 2 weeks ago (3 children)

I'm assuming the domain=ip should be the IP address of the AD server right? That's what I entered and still no luck. Same permission denied error as my past attempts.

[–] [email protected] 1 points 2 weeks ago (2 children)

Well not so much the adress of the AD server.

It should be the domain name of your domain that you have created.

As in [email protected]

The part behind the @ is the domain the user is registered to and even though the AD server might be named prod-ad-001 the text should be the domain you are trying to auth towards and the share you are accessing to should obvioisly have a connection the the AD to forward the credentials and ask if Auth is positive.

[–] [email protected] 1 points 2 weeks ago (1 children)

I understand that, I've tried both domain=CompanyWork and domain=CompanyWork.internal in my cred file and directly in fstab both result in the permission error when mounting the TrueNAS share but work just fine when mounting a share provided by Windows Server.

[–] [email protected] 1 points 2 weeks ago

Just for the sake of testing maybe try it with a oneliner:

sudo mount -t cifs -o user=testuser,domain=testdomain //192.168.1.100/share /mnt

Either way using the logs is the best way to check for discepancies. Also check in on the logs on the fileserver. Though idk what to advice to trace the logon stuff and trace whats making it fail.

Just for the case that you dont know where to look in windows: eventviewer is the place to go. Which predifined filter though - simply google that.

Wishing ya the best of luck mate!