各種ポートは必須になります
バインドするポートは作成した仮想ネットワーク上の IP を使ってバインドします
あとは特権を付与するのと必要なデータ領域のマウントをして起動してあげます
起動ログ
一応記載しておきます
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=corp,DC=example,DC=com
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=corp,DC=example,DC=com
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
A Kerberos configuration suitable for Samba 4 has been generated at /var/lib/samba/private/krb5.conf
Setting up fake yp server settings
Once the above files are installed, your Samba4 server will be ready to use
Server Role: active directory domain controller
Hostname: localdc
NetBIOS Domain: CORP
DNS Domain: corp.example.com
DOMAIN SID: S-1-5-21-3454798468-3565208184-955098804
/usr/lib/python2.7/dist-packages/supervisor/options.py:297: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2023-02-08 09:00:30,600 CRIT Supervisor running as root (no user in config file)
2023-02-08 09:00:30,600 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2023-02-08 09:00:30,608 INFO RPC interface 'supervisor' initialized
2023-02-08 09:00:30,608 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-02-08 09:00:30,608 INFO supervisord started with pid 17
2023-02-08 09:00:31,611 INFO spawned: 'samba' with pid 20
2023-02-08 09:00:32,796 INFO success: samba entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
で以下のような結果になれば OK です
以下の場合は上から順番にサーバ証明書CA証明書、中間CA証明書になります
fullchain.pem: OK
Chain:
depth=0: CN = *.myserver.com (untrusted)
depth=1: C = US, O = Let's Encrypt, CN = R3 (untrusted)
depth=2: C = US, O = Internet Security Research Group, CN = ISRG Root X1
分割する
あとは fullchain.pem を分割すれば OK です
「BEGIN CERTICATE」と「END CERTIFICATE」でひとかたまりなので最初の塊を server.crt として保存しあとの 2 つの塊を ca.crt として保存すれば OK です