Skip to content

Commit fbb9066

Browse files
fix(setup-ubuntu-ad): add ptr record
1 parent 87cc838 commit fbb9066

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup-ubuntu-active-directory/1-install_samba_ad.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,6 @@ systemctl restart chrony
160160
# 15. Create reverse DNS zone
161161
echo "Creating reverse DNS zone..."
162162
samba-tool dns zonecreate ${PRIMARY_DC_HOSTNAME} ${PTR_ADDRESS} -Uadministrator%${ADMIN_PASSWORD}
163-
samba-tool dns add ${PRIMARY_DC_HOSTNAME}.${REALM} ${PTR_ADDRESS} 220 PTR ${PRIMARY_DC_HOSTNAME}.${REALM} -Uadministrator%${ADMIN_PASSWORD}
163+
samba-tool dns add ${PRIMARY_DC_HOSTNAME}.${REALM} ${PTR_ADDRESS} $(echo ${PRIMARY_DC_IP} | awk --field-separator=. '{ print $4 }') PTR ${PRIMARY_DC_HOSTNAME}.${REALM} -Uadministrator%${ADMIN_PASSWORD}
164164

165165
echo "Installation complete. Please review the configuration and reboot the system."

setup-ubuntu-active-directory/2-join_additional_dc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,6 @@ systemctl restart chrony
160160

161161
# 15. Create reverse DNS record
162162
echo "Creating reverse DNS record..."
163-
samba-tool dns add ${SECONDARY_DC_HOSTNAME}.${REALM} ${PTR_ADDRESS} 220 PTR ${SECONDARY_DC_HOSTNAME}.${REALM} -Uadministrator%${ADMIN_PASSWORD}
163+
samba-tool dns add ${SECONDARY_DC_HOSTNAME}.${REALM} ${PTR_ADDRESS} $(echo ${SECONDARY_DC_IP} | awk --field-separator=. '{ print $4 }') PTR ${SECONDARY_DC_HOSTNAME}.${REALM} -Uadministrator%${ADMIN_PASSWORD}
164164

165165
echo "Additional DC setup complete. Please review the configuration and reboot the system."

0 commit comments

Comments
 (0)