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
nmbd already running? (pid=795).
smbd already running? (pid=799).
winbindd already running? (pid=803).
root@freebsd:~ # wbinfo -u
TEST\guest
TEST\krbtgt
TEST\administrator
TEST\chibi
root@freebsd:~ # wbinfo -n chibi
S-1-5-21-3232992735-2720986143-514732836-1104 SID_USER (1)
root@freebsd:~ # net ads info
LDAP server: 192.168.1.25
LDAP server name: dc1.test.jp
Realm: TEST.JP
Bind Path: dc=TEST,dc=JP
LDAP port: 389
Server time: Mon, 11 May 2020 16:23:41 JST
KDC server: 192.168.1.25
Server time offset: 45
Last machine account password change: Mon, 11 May 2020 16:22:17 JST
root@freebsd:~ # host -4 dc
dc.test.jp has address 192.168.1.24
root@freebsd:~ # host -4 dc1
dc1.test.jp has address 192.168.1.25
root@freebsd:~ # host -4 dc2
dc2.test.jp has address 192.168.1.26
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 dc.test.jp.
_ldap._tcp.test.jp has SRV record 0 100 389 dc2.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 dc.test.jp.
_kerberos._udp.test.jp has SRV record 0 100 88 dc1.test.jp.
root@freebsd:~ # host -t A test.jp
test.jp has address 192.168.1.24
test.jp has address 192.168.1.25
test.jp has address 192.168.1.26
root@freebsd:~ # smbclient -L localhost -U%
Sharename Type Comment
——— —- ——-
netlogon Disk
sysvol Disk
IPC$ IPC IPC Service (Samba 4.10.15)
Reconnecting with SMB1 for workgroup listing.
Server Comment
——— ——-
DC
DC1
DC2
FREEBSD Samba 4.10.15
Workgroup Master
——— ——-
TEST FREEBSD
WORKGROUP DESKTOP-0NRQL5D
root@freebsd:~ # smbclient //192.168.1.24/netlogon -Uadministrator
FreeBSD 13.0-CURRENT #0 r360723 Samba4.10.15 Windows Server 2019 Datacenter Active Directory Domain のメンバーに参加してみた