root@freebsd:~ # net ads join -U administrator
Enter administrator’s password:
Using short domain name — TEST
Joined ‘FREEBSD’ to dns domain ‘test.jp’
No DNS domain configured for freebsd. Unable to perform DNS Update.
DNS update failed: NT_STATUS_INVALID_PARAMETER
root@freebsd:~ # service samba_server restart
Performing sanity check on Samba configuration: OK
winbindd not running? (check /var/run/samba4/winbindd.pid).
smbd not running? (check /var/run/samba4/smbd.pid).
nmbd not running? (check /var/run/samba4/nmbd.pid).
Performing sanity check on Samba configuration: OK
Starting nmbd.
Starting smbd.
Starting winbindd.
root@freebsd:~ # wbinfo -u
TEST\administrator
TEST\guest
TEST\krbtgt
TEST\chibi
root@freebsd:~ # net ads info
LDAP server: 192.168.1.10
LDAP server name: dc.test.jp
Realm: TEST.JP
Bind Path: dc=TEST,dc=JP
LDAP port: 389
Server time: Mon, 01 Jul 2019 17:43:54 JST
KDC server: 192.168.1.10
Server time offset: -3
Last machine account password change: Mon, 01 Jul 2019 17:42:04 JST
root@freebsd:~ # wbinfo -n administrator
S-1-5-21-4283025733-908519724-3295402948-500 SID_USER (1)
root@freebsd:~ # host -4 dc
dc.test.jp has address 192.168.1.58
dc.test.jp has address 192.168.1.10
dc.test.jp has IPv6 address 2400:4052:46e0:b700:cc6c:3df7:45e4:e985
dc.test.jp has IPv6 address 2400:4052:46e0:b700:b03b:d3b7:8519:54be
root@freebsd:~ # host -4 dc1
dc1.test.jp has address 192.168.1.60
dc1.test.jp has IPv6 address 2400:4052:46e0:b700:9d2:83b4:4031:14cf
root@freebsd:~ # host -4 dc2
dc2.test.jp has address 192.168.1.61
dc2.test.jp has IPv6 address 2400:4052:46e0:b700:f0b7:1338:1a03:19fd
root@freebsd:~ # kinit administrator
administrator@TEST.JP’s Password:
root@freebsd:~ # klist
Credentials cache: FILE:/tmp/krb5cc_0
Principal: administrator@TEST.JP
Issued Expires Principal
Jul 1 17:44:44 2019 Jul 2 03:44:44 2019 krbtgt/TEST.JP@TEST.JP
root@freebsd:~ # host -t SRV _ldap._tcp.test.jp
_ldap._tcp.test.jp has SRV record 0 100 389 dc2.test.jp.
_ldap._tcp.test.jp has SRV record 0 100 389 dc1.test.jp.
_ldap._tcp.test.jp has SRV record 0 100 389 dc.test.jp.
root@freebsd:~ # host -t SRV _kerberos._udp.test.jp
_kerberos._udp.test.jp has SRV record 0 100 88 dc.test.jp.
_kerberos._udp.test.jp has SRV record 0 100 88 dc1.test.jp.
_kerberos._udp.test.jp has SRV record 0 100 88 dc2.test.jp.
root@freebsd:~ # host -t A test.jp
test.jp has address 192.168.1.61
test.jp has address 192.168.1.60
test.jp has address 192.168.1.58
test.jp has address 192.168.1.10
root@freebsd:~ # smbclient //192.168.1.10/netlogon -Uadministrator
FreeBSD 13.0-CURRENT r349251 Samba4.7.12 Windows Server 2019 Datacenter Active Directory Domainのメンバーに参加