I am using this command to add a Linux boxes to Active Directory:
net ads join -U username%password
I have to make this command idempotent by checking the Linux box already exists in the domain. The command line help it is not useful.
I wonder if there is something like:
net ads search computer-name
I am using Samba 3