root@freebsd:~ # kinit administrator
administrator@TEST.JP’s Password:
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 start
Performing sanity check on Samba configuration: OK
Starting nmbd.
Starting smbd.
Starting winbindd.
root@freebsd:~ # wbinfo -u
TEST\guest
TEST\administrator
TEST\krbtgt
TEST\chibi
root@freebsd:~ # wbinfo -n chibi
S-1-5-21-2092985958-4254752361-2950905742-1103 SID_USER (1)
root@freebsd:~ # net ads info
LDAP server: 192.168.1.38
LDAP server name: dc1.test.jp
Realm: TEST.JP
Bind Path: dc=TEST,dc=JP
LDAP port: 389
Server time: Mon, 06 Jul 2020 03:53:05 JST
KDC server: 192.168.1.38
Server time offset: 0
Last machine account password change: Mon, 06 Jul 2020 03:51:17 JST
root@freebsd:~ # uname -a
FreeBSD freebsd 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r362596: Thu Jun 25 05:02:51 UTC 2020 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
root@freebsd:~ # samba -V
Version 4.11.8
root@freebsd:~ # host -4 dc
dc.test.jp has address 192.168.1.19
dc.test.jp has address 192.168.1.35
dc.test.jp has IPv6 address 2400:4052:46e0:b700:29c4:a204:545c:3e2c
dc.test.jp has IPv6 address 2400:4052:46e0:b700:2d43:e3e4:e912:230
root@freebsd:~ # host -4 dc1
dc1.test.jp has address 192.168.1.38
dc1.test.jp has IPv6 address 2400:4052:46e0:b700:1f2:fcba:cdb2:933d
root@freebsd:~ # host -4 dc2
dc2.test.jp has address 192.168.1.37
dc2.test.jp has IPv6 address 2400:4052:46e0:b700:606d:e2e1:e8d5:267f
root@freebsd:~ # host t SRV _ldap._tcp.test.jp
host: couldn’t get address for ‘SRV’: Name does not resolve
root@freebsd:~ # host -t SRV _ldap._tcp.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 dc2.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 dc2.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 dc.test.jp.
root@freebsd:~ # host -t A test.jp
test.jp has address 192.168.1.37
test.jp has address 192.168.1.35
test.jp has address 192.168.1.38
test.jp has address 192.168.1.19
root@freebsd:~ # smbclient -L 192.168.1.19 -U%
Sharename Type Comment
——— —- ——-
SMB1 disabled — no workgroup available
root@freebsd:~ # smbclient //192.168.1.19/netlogon -Uadministrator
FreeBSD 13.0-CURRENT #0 r362596 Samba4.11.8 Windows Server 2019 Datacenter Active Directory Domain のメンバーに参加してみた