Occ ldap:show-remnants get userlist

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 :wink:

yogg

Hi,

you can always create feature requests / suggestion at the bugtracker:

https://github.com/owncloud/core/issues

Yea I know. But maybe I have simply overseen the already available easy to use way.
So I first need to clarify if there is already an easy way available?
If not I can open an feature request.

yogg01