AD/SMB not working after system reboot

scotrod

Dabbler
Joined
Apr 30, 2021
Messages
42
Hello, for a few days now I am trying to get a TrueNAS-12.0-U3 to work with Active Directory. Please note that I am beginner with this software and I'm familiar just with the basics. The problem described bellow appears for THIRD time after fresh reinstall of TrueNAS.

So, after setting the NTP/Time zone/DNS and AD service, I have a shared directory which I can access with AD user, everything is working as expected. Expect when I reboot the TrueNAS server - after reboot I get this notification:

Attempt to connect to netlogon share failed with error: [EFAULT] could not obtain winbind interface details: Winbind daemon is not available. could not obtain winbind domain name! failed to call wbcPingDc: Winbind daemon is not available..

And the SMB service is stopped, I can start it, but after I change the window from the GUI to let's say Network and go back to Services, the SMB service is stopped again (GUI bug??). After that I see Active Directory FAULTED in device services monitor.
wbinfo -g gets the following output:

could not obtain winbind inferface detauls: WBC_ERR_WINBIND_NOT_AVAILABLE
could not obtain winbind domain na,e!
failed to call wbcListGroups: WBC_ERR_WINBIND_NOT_AVAILABLE
Error looking up domain groups


I tried this three times and three times in a row I get the same result, and I don't know what I may be doing wrong.

Thanks in advance.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello, for a few days now I am trying to get a TrueNAS-12.0-U3 to work with Active Directory. Please note that I am beginner with this software and I'm familiar just with the basics. The problem described bellow appears for THIRD time after fresh reinstall of TrueNAS.

So, after setting the NTP/Time zone/DNS and AD service, I have a shared directory which I can access with AD user, everything is working as expected. Expect when I reboot the TrueNAS server - after reboot I get this notification:

Attempt to connect to netlogon share failed with error: [EFAULT] could not obtain winbind interface details: Winbind daemon is not available. could not obtain winbind domain name! failed to call wbcPingDc: Winbind daemon is not available..

And the SMB service is stopped, I can start it, but after I change the window from the GUI to let's say Network and go back to Services, the SMB service is stopped again (GUI bug??). After that I see Active Directory FAULTED in device services monitor.
wbinfo -g gets the following output:

could not obtain winbind inferface detauls: WBC_ERR_WINBIND_NOT_AVAILABLE
could not obtain winbind domain na,e!
failed to call wbcListGroups: WBC_ERR_WINBIND_NOT_AVAILABLE
Error looking up domain groups


I tried this three times and three times in a row I get the same result, and I don't know what I may be doing wrong.

Thanks in advance.
What is output of testparm -s
 

scotrod

Dabbler
Joined
Apr 30, 2021
Messages
42
What is output of testparm -s

root@truenas[~]# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER

# Global parameters
[global]
aio max threads = 2
allow trusted domains = No
bind interfaces only = Yes
client ldap sasl wrapping = seal
disable spoolss = Yes
dns proxy = No
domain master = No
enable web service discovery = Yes
kerberos method = secrets and keytab
kernel change notify = No
load printers = No
local master = No
logging = file
max log size = 5120
nsupdate command = /usr/local/bin/samba-nsupdate -g
preferred master = No
realm = DOMAINNAME.LOCAL
registry shares = Yes
restrict anonymous = 2
security = ADS
server role = member server
server string = TrueNAS Server
template shell = /bin/sh
unix extensions = No
winbind cache time = 7200
winbind enum groups = Yes
winbind enum users = Yes
winbind max domain connections = 10
workgroup = DOMAINNAME
idmap config *: range = 90000001-100000000
idmap config DOMAINNAME: range = 100000001-200000000
idmap config DOMAINNAME: backend = rid
idmap config * : backend = tdb
directory name cache size = 0
dos filemode = Yes


[tank2]
ea support = No
kernel share modes = No
path = /mnt/tank/tank2
posix locking = No
read only = No
vfs objects = streams_xattr shadow_copy_zfs ixnas aio_fbsd
nfs4:chown = true
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Okay. I don't see anything obvious there. The fact that the SMB service is stopping entirely means that an error condition is preventing samba from starting. What do you see if you run the command smbd -d5 -i? (you can hit ^c to stop it after gathering info).
 

scotrod

Dabbler
Joined
Apr 30, 2021
Messages
42
Okay. I don't see anything obvious there. The fact that the SMB service is stopping entirely means that an error condition is preventing samba from starting. What do you see if you run the command smbd -d5 -i? (you can hit ^c to stop it after gathering info).
Leaving this one on pastebin since It's one thicc boi
 
Joined
Jul 14, 2021
Messages
2
Hello! Same problem here.
Everytime that I reboot truenas the SMB is down.
My temporary solution is leave the domain and ingress again.
Any solucion?!
 

scotrod

Dabbler
Joined
Apr 30, 2021
Messages
42
Hello! Same problem here.
Everytime that I reboot truenas the SMB is down.
My temporary solution is leave the domain and ingress again.
Any solucion?!
Yes, I have found the solution.
After few days researching, posting in forums and mindless searching through the logs, I went to the shop and bought a true nas like Synology which actually works.
I advise you to do the same since I could not get any help here nor anything else.
 
Joined
Jul 14, 2021
Messages
2
Hello.
I found a terrible solution, but it worked!
In "Init/Shutdown Scripts" I added the command:

net ads join domain.com -U user%password && service smbd restart && service winbindd restart
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello.
I found a terrible solution, but it worked!
In "Init/Shutdown Scripts" I added the command:

net ads join domain.com -U user%password && service smbd restart && service winbindd restart
It sounds like your system dataset is perhaps not properly initializing on boot or samba metadata is being written to tmpfs. Can you perhaps send me a debug please?
 
Joined
Apr 30, 2014
Messages
9
Hello, I'm having the same issue. I thought it was a problem due to "power loss", but after a AD is healthy, I reboot truenas and is unhealthy again. A new join using username and password fixes it. How do I send a debug? Thanks!
 

Kamikaze321

Dabbler
Joined
Nov 30, 2015
Messages
11
I'm having the same issue with my 12.0U5 box. AD always breaks after reboot. I've been doing an AD disconnect + rejoin to fix it.
 

tonci

Dabbler
Joined
Mar 14, 2013
Messages
18
the same issue by my setup .... Had to go down to 12.0U1 (from U5) to get it work stable
 

tonci

Dabbler
Joined
Mar 14, 2013
Messages
18
Can't reproduce the issue in-house may be something unique to your setup. Can you send me a debug for investigation?
There is no setup at all actually , right after fresh install , the first step is joining the domain ... entering domain name, admin and pwd ...
In U1 AD connection persists after reboot , but in U5 does not
Where do I find debug to send you ?
 

IOSonic

Explorer
Joined
Apr 26, 2020
Messages
54
@anodos I ran into this as well. Downgrading to U1 from U5 also fixed it for me. I've been busy troubleshooting else lately and didn't have time for this, but I'll figure out how to open a bug report in the next few. I assume you'll want a samba.log as well.

I misread the original post. I experienced this issue, but I was using NETBIOS, not AD. I'll create a separate thread when I get back to this to avoid conflating potentially different problems.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
There is no setup at all actually , right after fresh install , the first step is joining the domain ... entering domain name, admin and pwd ...
In U1 AD connection persists after reboot , but in U5 does not
Does issue occur if you create a zpool before joining AD?
 

greynozo

Cadet
Joined
Aug 11, 2021
Messages
2
Hello.
I found a terrible solution, but it worked!
In "Init/Shutdown Scripts" I added the command:

net ads join domain.com -U user%password && service smbd restart && service winbindd restart

Hi Everyone,

In my case, this problem occurred after to start Freenas without LAN conection. I can't to starting service SMB manually or using comands.
Aparently, the only solution is to leave domain and rejoin domain. Therefore, Performance100's solution seems to fix the problem temporarily.
 
Top