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-3153889836-307192526-2969236381-1103 SID_USER (1)
root@freebsd:~ # net ads info
LDAP server: 192.168.1.55
LDAP server name: dc1.test.jp
Realm: TEST.JP
Bind Path: dc=TEST,dc=JP
LDAP port: 389
Server time: Tue, 05 May 2020 19:42:52 JST
KDC server: 192.168.1.55
Server time offset: 0
Last machine account password change: Tue, 05 May 2020 19:41:23 JST
root@freebsd:~ # host -4 dc
dc.test.jp has address 192.168.1.51
dc.test.jp has address 192.168.1.53
dc.test.jp has IPv6 address 2400:4052:46e0:b700:e53c:ed66:5a3c:b8cc
dc.test.jp has IPv6 address 2400:4052:46e0:b700:4c26:f2b1:4718:16d
root@freebsd:~ # host -4 dc1
dc1.test.jp has address 192.168.1.55
dc1.test.jp has IPv6 address 2400:4052:46e0:b700:999c:ad75:5ee:8fce
root@freebsd:~ # host -4 dc2
dc2.test.jp has address 192.168.1.54
dc2.test.jp has IPv6 address 2400:4052:46e0:b700:a519:f5f9:1261:1480
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.53
test.jp has address 192.168.1.51
test.jp has address 192.168.1.54
test.jp has address 192.168.1.55
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
FREEBSD Samba 4.10.15
Workgroup Master
——— ——-
TEST FREEBSD
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
FREEBSD Samba 4.10.15
Workgroup Master
——— ——-
TEST FREEBSD
root@freebsd:~ # smbclient //192.168.1.51/netlogon -Uadministrator