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\krbtgt
TEST\administrator
TEST\chibi
root@freebsd:~ # wbinfo -n chibi
S-1-5-21-212194710-1998421792-903778468-1105 SID_USER (1)
root@freebsd:~ # net ads info
LDAP server: 192.168.1.33
LDAP server name: dc1.test.jp
Realm: TEST.JP
Bind Path: dc=TEST,dc=JP
LDAP port: 389
Server time: Wed, 13 May 2020 19:37:27 JST
KDC server: 192.168.1.33
Server time offset: -1
Last machine account password change: Wed, 13 May 2020 19:35:57 JST
root@freebsd:~ # host -4 dc
dc.test.jp has address 192.168.1.31
dc.test.jp has IPv6 address 2400:4052:46e0:b700:35fe:39b5:18f9:2353
root@freebsd:~ # host -4 dc1
dc1.test.jp has address 192.168.1.33
dc1.test.jp has IPv6 address 2400:4052:46e0:b700:7955:6a8:f505:354c
root@freebsd:~ # host -4 dc2
dc2.test.jp has address 192.168.1.34
dc2.test.jp has IPv6 address 2400:4052:46e0:b700:611b:b177:f897:2039
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 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.34
test.jp has address 192.168.1.31
test.jp has address 192.168.1.33
root@freebsd:~ # smbclient -L local -U%
do_connect: Connection to local failed (Error NT_STATUS_UNSUCCESSFUL)
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
root@freebsd:~ # smbclient //192.168.1.31/netlogon -Uadministrator
FreeBSD 12.1-STABLE r360721 Samba4.10.15 Windows Server 2019 Datacenter Active Directory Domain のメンバーに参加してみた