return ldap group name of user
Hello,
Sorry i'm new with ldapsearch, With the following command i can return the dn group name of user, but i want to retuen only the group name or gid without other information: Code:
ldapsearch -h ipaserver.example.com -p 389 -x -b "dc=example,com" "(&(objectClass=posixGroup)(memberUid=test-user))" dn |
Hi,
I guess you want to get just "cn=jabber_users" from the whole ldapsearch output. If that's the case, you could try something like: Code:
ldapsearch -h ipaserver.example.com -p 389 -x -b "dc=example,com" "(&(objectClass=posixGroup)(memberUid=test-user))" dn|grep -o 'cn=.*'|cut -d',' -f1 |
Hi bathory,
Thank you for the quick reply, This query will be used in freeradius authentication and i'm not sure if grep works in freeradius query ? Thanks, |
All times are GMT -5. The time now is 08:43 AM. |