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 -n chibi
S-1-5-21-569922169-655339872-509955901-1103 SID_USER (1)
root@freebsd:~ # net ads info
LDAP server: 192.168.1.63
LDAP server name: dc.test.jp
Realm: TEST.JP
Bind Path: dc=TEST,dc=JP
LDAP port: 389
Server time: Mon, 15 Feb 2021 17:46:30 JST
KDC server: 192.168.1.63
Server time offset: 0
Last machine account password change: Mon, 15 Feb 2021 17:44:04 JST
root@freebsd:~ # host -4 dc
dc.test.jp has address 192.168.1.63
dc.test.jp has address 192.168.1.64
dc.test.jp has IPv6 address 2400:4052:46e0:b700:a5c1:a91b:faa2:4762
dc.test.jp has IPv6 address 2400:4052:46e0:b700:4ddd:52e8:256b:f6db
root@freebsd:~ # host -4 dc1
dc1.test.jp has address 192.168.1.72
dc1.test.jp has IPv6 address 2400:4052:46e0:b700:c027:23b1:661c:fc31
root@freebsd:~ # host -4 dc2
dc2.test.jp has address 192.168.1.74
dc2.test.jp has IPv6 address 2400:4052:46e0:b700:d967:4949:db29:5dcf
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 dc.test.jp.
_ldap._tcp.test.jp has SRV record 0 100 389 dc1.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 dc2.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.72
test.jp has address 192.168.1.74
test.jp has address 192.168.1.64
test.jp has address 192.168.1.63
root@freebsd:~ # smbclient //192.168.1.63/netlogon -Uadministrator
Enter TEST\administrator’s password:
Try “help” to get a list of possible commands.
smb: \> ls
. D 0 Thu Feb 4 06:46:08 2021
.. D 0 Thu Feb 4 06:46:08 2021
124869119 blocks of size 4096. 106634355 blocks available
smb: \> exit
root@freebsd:~ # smbclient //192.168.1.63/sysvol -Uadministrator
Enter TEST\administrator’s password:
Try “help” to get a list of possible commands.
smb: \> ls
. D 0 Thu Feb 4 06:46:08 2021
.. D 0 Thu Feb 4 06:46:08 2021
test.jp Dr 0 Thu Feb 4 06:46:08 2021
124869119 blocks of size 4096. 106637555 blocks available
smb: \> exit
root@freebsd:~ # uname -a
FreeBSD freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n244733-c511a5ab53b: Thu Feb 11 07:07:14 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
root@freebsd:~ # samba -V
Version 4.13.1
root@freebsd:~ # net ads lookup
FreeBSD 14.0-CURRENT #0 main-n244733-c511a5ab53b Samba4.13.1 AMD EPYC 7742 64core Processor x2 sockets で構築した Windows Server 2019 Datacenter Active Directory Domain のメンバーに参加してみた