# ldapsearch -I -LLL objectCategory=CN=Group,CN=Schema,CN=Configuration,DC=fb,DC=frobozz,dc=com,dc=au dn | sed -r 's/dn: CN=([^,]+).*/\1/p' | sort