Cloud-Init 스크립트를 사용하여 Ubuntu 22.04 서버를 설정하고 있습니다.
그런데 Active Directory에 가입하기 위해 로그를 확인하면 하위 도메인이 제거됩니다. 이유는 무엇입니까?
IP 주소를 통해서만 원격으로 연결할 수 있고 기기에 등록된 호스트 이름이나 하위 도메인 이름을 통해서는 연결할 수 없습니까?
나는 또한 스크립트를
hostname: "testmachine" # <--
fqdn: "testmachine.mrsomething.mr" # <--
write_files:
- path: /home/root/01-netcfg.yaml
content: |
network:
version: 2
ethernets:
ens3:
addresses:
- 10.1.44.181/24 <-- IP Address of the machine
nameservers:
addresses:
- 10.1.44.11 <-- Domain name controller 1
- 10.1.44.12 <-- Domain name controller 2
search:
- "mrsomething.mr"
- "mr"
routes:
- to: default
via: 10.1.44.1
mtu: 3000
owner: root:root
- path: /home/root/krb5.conf
content: |
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = MRSOMETHING.MR
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = true
[realms]
MRSOMETHING.MR = {
kdc = dc1.mrsomething.mr
kdc = dc2.mrsomething.mr
admin_server = dc1.mrsomething.mr
default_domain = mrsomething.mr
primary_kdc = dc1.mrsomething.mr
}
[domain_realm]
.mrsomething.mr = MRSOMETHING.MR
mrsomething.mr = MRSOMETHING.MR
owner: root:root
- path: /home/root/sssd.conf
content: |
[sssd]
domains = mrsomething.mr, testmachine.mrsomething.mr, magic.mrsomething.mr
config_file_version = 2
services = nss, pam
default_domain_suffix = MRSOMETHING.MR
[domain/mrsomething.mr]
ad_domain = mrsomething.mr
krb5_realm = MRSOMETHING.MR
realmd_tags = manages-system joined-with-adcli
default_shell = /bin/bash
krb5_store_password_if_offline = True
cache_credentials = True
id_provider = ad
override_homedir = /home/%u
fallback_homedir = /home/%u
ldap_id_mapping = True
access_provider = simple
simple_allow_groups = domain admins
use_fully_qualified_names = True
runcmd:
- "rm /etc/netplan/*"
- "mv /home/root/01-netcfg.yaml /etc/netplan/01-netcfg.yaml"
- "netplan apply"
# download docker ....
# Update all installed packages.
# join realm
- "echo 'password123' | realm join mrsomething.mr --user=mrjoiner"
- "mv /home/root/krb5.conf /etc/krb5.conf"
- "mv /home/root/sssd.conf /etc/sssd/sssd.conf"
- "chmod 600 /etc/sssd/sssd.conf"
# Make sure our users get a home directory
- "pam-auth-update --enable mkhomedir"
- "systemctl enable sssd"
- "systemctl start sssd"
- "reboot"
"sssd_mrsomething.mr.log" 로그를 확인하면
나는 그것을 본다.
"테스트 컴퓨터를 삭제하려면 업데이트하세요. A. 3600에 테스트 컴퓨터를 추가하려면 업데이트하세요. A 10.1.44.181에서 테스트 컴퓨터를 삭제하려면 업데이트를 보내세요. AAAA에서"