Hi
Is there a nice way to get the the ldap remnats as a list of single user names?
Currently "occ ldap:show-remnants" returns something like this:
+--------------------------------------+-----------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------+---------------+-----+--------+
| ownCloud name | Display Name | LDAP UID | LDAP DN | Last Login | Dir | Sharer |
+--------------------------------------+-----------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------+---------------+-----+--------+
| USER_ID01 | | | cn=mytestuser,ou=mustermann,ou=my-users,dc=mydomain,dc=local | - | | N |
...
+--------------------------------------+-----------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------+---------------+-----+--------+
Now I need the "ownCloud name" to use it with "occ user:delete [user_id]".
I can now use some bash magic to get what I need:occ ldap:show-remnants | grep "^|" | cut -d "|" -f 2 | sed 's/^ *//;s/ *$//' | grep -v "ownCloud name"
This returns:
USER_ID01
USER_ID02
...
This is ok but something more script friendly would be nice
yogg