Index: univention-run-join-scripts =================================================================== --- univention-run-join-scripts (Revision 37280) +++ univention-run-join-scripts (Arbeitskopie) @@ -124,7 +124,7 @@ read -s password DCPWD=$(mktemp) trap "rm -f '$DCPWD'" EXIT - echo "$password" >>$DCPWD + echo -n "$password" >>$DCPWD echo "" echo "" fi @@ -133,19 +133,19 @@ # First use udm to search the user DN binddn="$(univention-ssh "$DCPWD" "$DCACCOUNT"@"$ldap_master" \ - /usr/sbin/udm users/user list --filter uid=$DCACCOUNT --logfile /dev/null | sed -ne 's|DN: ||p')" + /usr/sbin/univention-directory-manager users/user list --filter uid=$DCACCOUNT --logfile /dev/null | sed -ne 's|DN: ||p')" if [ -z "$binddn" ]; then # Next check is the local ldapi interface binddn="$(univention-ssh "$DCPWD" "$DCACCOUNT"@"$ldap_master" \ - ldapsearch -x LLL -H ldapi:/// "(&(uid=$DCACCOUNT)(objectClass=person))" dn | ldapsearch-decode64 | sed -ne 's|^dn: ||p;s|^DN: ||p')" + ldapsearch -x LLL -H ldapi:/// "(&(uid=$DCACCOUNT)(objectClass=person))" dn | ldapsearch-wrapper | ldapsearch-decode64 | sed -ne 's|^dn: ||p;s|^DN: ||p')" fi if [ -z "$binddn" ]; then # Check with anonymous bind ldap_result=$(univention-ssh "$DCPWD" "$DCACCOUNT"@"$ldap_master" \ "ldapsearch -x -LLL \'\(\&\(uid=$DCACCOUNT\)\(objectClass=person\)\)\' dn") - for i in $(echo "$ldap_result" | ldapsearch-wrapper | sed -n 's/^dn: \(.*\)/\1/p'); do + for i in $(echo "$ldap_result" | ldapsearch-wrapper | ldapsearch-decode64 | sed -ne 's|^dn: ||p'); do if [ -n "$binddn" ]; then failed_message "binddn for user $DCACCOUNT not unique, $i and $binddn" fi @@ -157,7 +157,7 @@ if [ -z "$binddn" ]; then failed_message "binddn for user $DCACCOUNT not found" else - ldapsearch -x -LLL -b "$ldap_base" -D "$binddn" -w `cat $DCPWD` -LLL -s base >/dev/null 2>&1 + ldapsearch -x -LLL -b "$ldap_base" -D "$binddn" -w "$(<"$DCPWD")" -LLL -s base >/dev/null 2>&1 if [ $? != 0 ]; then failed_message "Invalid credentials" else @@ -192,7 +192,7 @@ fi if [ ! "$server_role" = "domaincontroller_master" ] || [ -n "$ASK_PASS" ] ; then - "$i" --binddn "$binddn" --bindpwd "$(cat "$DCPWD")" + "$i" --binddn "$binddn" --bindpwd "$(<"$DCPWD")" else "$i" fi Index: univention-join =================================================================== --- univention-join (Revision 37280) +++ univention-join (Arbeitskopie) @@ -124,7 +124,7 @@ check_ldap_tls_connection () { echo -n "Check TLS connection " - eval "$(ucr shell ldap/master/port)" + eval "$(univention-config-registry shell ldap/master/port)" ldapsearch -x -ZZ -p "$ldap_master_port" -s base -h "$DCNAME" -D "$binddn" -w "$(<"$DCPWD")" dn >/dev/null if [ $? != 0 ]; then @@ -254,7 +254,7 @@ # get master versions -versions="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/ucr search --brief ^version/)" +versions="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/univention-config-registry search --brief ^version/)" OLDIFS=$IFS IFS=$'\n' for i in $versions; do @@ -301,7 +301,7 @@ if [ -x /etc/init.d/samba4 ]; then echo -n "Stop Samba 4 Server: " if [ "$dns_backend" = "samba4" ]; then - ucr set dns/backend=ldap >>/var/log/univention/join.log 2>&1 + univention-config-registry set dns/backend=ldap >>/var/log/univention/join.log 2>&1 /etc/init.d/bind9 restart >>/var/log/univention/join.log 2>&1 fi /etc/init.d/samba4 stop >>/var/log/univention/join.log 2>&1 @@ -310,7 +310,7 @@ if [ -z "$LDAPBASE" ]; then echo -n "Search ldap/base" - ldap_base="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/ucr search --brief ^ldap/base$ | sed -ne 's|^ldap/base: ||p')" + ldap_base="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/univention-config-registry search --brief ^ldap/base$ | sed -ne 's|^ldap/base: ||p')" else ldap_base="$LDAPBASE" fi @@ -332,7 +332,7 @@ # First use udm to search the user DN binddn="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" \ - /usr/sbin/udm users/user list --filter uid="$DCACCOUNT" --logfile /dev/null | sed -ne 's|^DN: ||p')" + /usr/sbin/univention-directory-manager users/user list --filter uid="$DCACCOUNT" --logfile /dev/null | sed -ne 's|^DN: ||p')" if [ -z "$binddn" ]; then # Next check is the local ldapi interface @@ -478,7 +478,7 @@ if [ -e /etc/runit/univention/univention-directory-listener ]; then echo -n "Stopping univention-directory-listener daemon: " /etc/init.d/univention-directory-listener stop >/dev/null 2>&1 - while ! sv status univention-directory-listener | grep "^down" >/dev/null + while ! sv status univention-directory-listener | grep -q "^down" do sleep 1 /etc/init.d/univention-directory-listener stop >/dev/null 2>&1 Index: univention-server-join =================================================================== --- univention-server-join (Revision 37280) +++ univention-server-join (Arbeitskopie) @@ -168,7 +168,7 @@ if [ -z "$BINDDN" ]; then if [ -n "$BINDACCOUNT" ]; then # FIXME: This not longer works with anonymous bind disabled! - BINDDN="$(ldapsearch -x "(&(uid=$BINDACCOUNT)(objectclass=posixAccount))" dn | ldapsearch-wrapper | sed -ne 's|dn: ||p')" + BINDDN="$(ldapsearch -x "(&(uid=$BINDACCOUNT)(objectclass=posixAccount))" dn | ldapsearch-wrapper | ldapsearch-decode64 | sed -ne 's|dn: ||p')" log 0 "found BINDDN: $BINDDN" >>"$LOGFILE" if [ -z "$BINDDN" ]; then log 1 "E: failed to get binddn for $BINDACCOUNT"