This issue first arose for me on 9.2.1.5 where I could not start directory services.
I did find bug 4874 where someone had the issue with 2008R2 and 9.2.1.5 where there were steps to start the service via cli which does allows the service to start.
After upgrading to 9.2.1.6 I am still having the issue. Using the same commands to start the service as I had to do with 9.2.1.5 seems to start the service with no issues.
Here are the commands I am using to start.
sqlite3 /data/freenas-v1.db "update services_services set srv_enable = 1 where srv_service = 'directoryservice'"
service ix-kerberos start
service ix-kinit start
service ix-kinit status
echo $?
klist
service ix-pam start
service ix-nsswitch start
service ix-samba start
net -k ads join DOMAINNAME
service ix-activedirectory status
echo $?
service samba_server restart
This allows directory services to start and then CIFS can be started with no issues.
If I add the command service ix-activedirectory start between the service ix-samba start and net -k ads join DOMAINNAME I receive the following error.
Failed to join domain: failed to set machine spn: Constraint violation
Failed to leave domain: failed to connect to AD: Cannot read password
winbindd not running? (check /var/run/samba/winbindd.pid).
smbd not running? (check /var/run/samba/smbd.pid).
nmbd not running? (check /var/run/samba/nmbd.pid).
I did find bug 4874 where someone had the issue with 2008R2 and 9.2.1.5 where there were steps to start the service via cli which does allows the service to start.
After upgrading to 9.2.1.6 I am still having the issue. Using the same commands to start the service as I had to do with 9.2.1.5 seems to start the service with no issues.
Here are the commands I am using to start.
sqlite3 /data/freenas-v1.db "update services_services set srv_enable = 1 where srv_service = 'directoryservice'"
service ix-kerberos start
service ix-kinit start
service ix-kinit status
echo $?
klist
service ix-pam start
service ix-nsswitch start
service ix-samba start
net -k ads join DOMAINNAME
service ix-activedirectory status
echo $?
service samba_server restart
This allows directory services to start and then CIFS can be started with no issues.
If I add the command service ix-activedirectory start between the service ix-samba start and net -k ads join DOMAINNAME I receive the following error.
Failed to join domain: failed to set machine spn: Constraint violation
Failed to leave domain: failed to connect to AD: Cannot read password
winbindd not running? (check /var/run/samba/winbindd.pid).
smbd not running? (check /var/run/samba/smbd.pid).
nmbd not running? (check /var/run/samba/nmbd.pid).