How can I verify if a group exists in Active Directory on a certain domain

In Windows you can use the "net" command to do this quite easily:

net group /domain groupName

Which checks if groupName exists in your current domain.

Is there something equivalent in Mac?


Solution 1:

To find a user:

dscl "/Active Directory/DOMAIN/All Domains" read /Users/user

To find a group:

dscl "/Active Directory/DOMAIN/All Domains" read /Groups/group