I am trying to redirect the output of a command to a file and am getting an error. Anyone have an idea on how to fix it:
Code:
ldapsearch -x -h xxx.xxx.xxx.xxx -w xxxxxx -b 'cn=Users,DC=mydomain,DC=com' -D "cn=Administrator,cn=Users,dc=mydomain,dc=com"
this command works great and outputs over a thousand records to my screen which doesn't do me a whole lot of good. Now, this command produces this error:
Code:
ldapsearch -x -h xxx.xxx.xxx.xxx -w xxxxxx -b 'cn=Users,DC=mydomain,DC=com' -D "cn=Administrator,cn=Users,dc=mydomain,dc=com" > output.ldif
ldap_result: Can't contact LDAP server (81)
Any ideas? Is there a different way I could redirect this output to a file. I have also tried >> with no avail.