After a successful installation, our Linux clients start a shell script that still performs various configurations. One of these steps is joining our Univention domain. Similar like this:
https://docs.software-univention.de/domain-4.3.html#ext-dom-ubuntu
With one exception this works perfect:
When I start the following example script on the UCS master directly, the client will be entered correct.
#!/bin/bash
ldap_base="dc=nothing,dc=intranet"
clientname="wla666"
password="Welcome!2Heaven!"
client_mac="90:1b:0e:ff:ff:ff"
client_ip="192.168.66.6"
domainname="nothing.intranet"
udm computers/linux create \
--position "cn=computers,$ldap_base" \
--set name="$clientname" --set password="$password" \
--set operatingSystem="Debian" \
--set operatingSystemVersion="666" \
--set network="cn=default,cn=networks,$ldap_base" \
--set mac="$client_mac" \
--set ip="$client_ip" \
--set dnsEntryZoneForward="zoneName=$domainname,cn=dns,$ldap_base $client_ip" \
--set dnsEntryZoneReverse="zoneName=66.168.192.in-addr.arpa,cn=dns,$ldap_base $client_ip" \
--set dhcpEntryZone="cn=$domainname,cn=dhcp,$ldap_base $client_ip $client_mac"
When I start it remote via ssh…
#!/bin/bash
ldap_base="dc=nothing,dc=intranet"
clientname="wla666"
password="Welcome!2Heaven!"
client_mac="90:1b:0e:ff:ff:ff"
client_ip="192.168.66.6"
domainname="nothing.intranet"
ssh -n root@server udm computers/linux create \
--position "cn=computers,$ldap_base" \
--set name="$clientname" --set password="$password" \
--set operatingSystem="Debian" \
--set operatingSystemVersion="666" \
--set network="cn=default,cn=networks,$ldap_base" \
--set mac="$client_mac" \
--set ip="$client_ip" \
--set dnsEntryZoneForward="zoneName=$domainname,cn=dns,$ldap_base $client_ip" \
--set dnsEntryZoneReverse="zoneName=66.168.192.in-addr.arpa,cn=dns,$ldap_base $client_ip" \
--set dhcpEntryZone="cn=$domainname,cn=dhcp,$ldap_base $client_ip $client_mac"
… I get as response:
WARNING: the following arguments are ignored: "192.168.66.6" "--set" "dnsEntryZoneReverse=zoneName=66.168.192.in-addr.arpa,cn=dns,dc=nothing,dc=intranet" "192.168.66.6" "--set" "dhcpEntryZone=cn=nothing.intranet,cn=dhcp,dc=nothing,dc=intranet" "192.168.66.6" "90:1b:0e:ff:ff:ff"
Object created: cn=wla666,cn=computers,dc=nothing,dc=intranet
Indeed, when I check the computer information on the web interface, the DNS and DHCP information for this client is empty. I have to correct this manually each time.
I am a little bit obscured about the difference. What goes wrong here…
I am glad for any advice.
Best,
reneum