organization mandatory

This commit is contained in:
Denis Knauf 2018-03-29 23:03:10 +02:00
parent 36acb99051
commit 874111a66b

View file

@ -3,13 +3,6 @@
basedn=$(cat basedn) basedn=$(cat basedn)
_x=${basedn%%,*} _x=${basedn%%,*}
dc=${_x#*=} dc=${_x#*=}
en=${_x%%=*}
if [ Xdc = "X$en" ]
then
en=""
else
en=`printf '\n%s' "$en: $dc"`
fi
pw=`pwgen 8 1` pw=`pwgen 8 1`
echo "# Password for cn=root,$basedn: $pw" >&2 echo "# Password for cn=root,$basedn: $pw" >&2
@ -18,7 +11,8 @@ dn: $basedn
objectClass: top objectClass: top
objectClass: dcObject objectClass: dcObject
objectClass: organization objectClass: organization
dc: ${dc}${en} dc: $dc
o: $dc
structuralObjectClass: organization structuralObjectClass: organization
dn: cn=root,$basedn dn: cn=root,$basedn