How do you perform an Ldapsearch on a secure port?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












My company had an example of a script that performs a search against a secure port.



ldapsearch -h $host -p $port -P /$var/$var/alias/slapd-cert8.db -Z -s base -b "" "objectclass apemdsuffix | grep netscapemdsuffix`;



I'm trying to do a simple search of an ldap database, finding anything with an objectclass of top. I know the root of the database, as well as the port/host etc. But after looking around, can't find much to actually make a search work.
I've tried varitions of the following command(all $ signs are variable name instead of real name), but still either get a bind error, or some other error. Any idea on what else is needed to make this statement work properly, or am I actually doing the search wrong?



ldapsearch -h ldaps://$serverName:$securePort# -p $unsecurePort -P /$var/$var/alias/slapd-cert8.db -Z -D cn=$bindingmanager -j /password/file -D o=com objectclass=top







share|improve this question






















  • Can you edit and check the formatting? I think at least some of those backslashes shouldn't be there. Four-space indent for a code block, see the small ? sign at the corner of the edit toolbar
    – ilkkachu
    Dec 5 '17 at 22:18














up vote
0
down vote

favorite












My company had an example of a script that performs a search against a secure port.



ldapsearch -h $host -p $port -P /$var/$var/alias/slapd-cert8.db -Z -s base -b "" "objectclass apemdsuffix | grep netscapemdsuffix`;



I'm trying to do a simple search of an ldap database, finding anything with an objectclass of top. I know the root of the database, as well as the port/host etc. But after looking around, can't find much to actually make a search work.
I've tried varitions of the following command(all $ signs are variable name instead of real name), but still either get a bind error, or some other error. Any idea on what else is needed to make this statement work properly, or am I actually doing the search wrong?



ldapsearch -h ldaps://$serverName:$securePort# -p $unsecurePort -P /$var/$var/alias/slapd-cert8.db -Z -D cn=$bindingmanager -j /password/file -D o=com objectclass=top







share|improve this question






















  • Can you edit and check the formatting? I think at least some of those backslashes shouldn't be there. Four-space indent for a code block, see the small ? sign at the corner of the edit toolbar
    – ilkkachu
    Dec 5 '17 at 22:18












up vote
0
down vote

favorite









up vote
0
down vote

favorite











My company had an example of a script that performs a search against a secure port.



ldapsearch -h $host -p $port -P /$var/$var/alias/slapd-cert8.db -Z -s base -b "" "objectclass apemdsuffix | grep netscapemdsuffix`;



I'm trying to do a simple search of an ldap database, finding anything with an objectclass of top. I know the root of the database, as well as the port/host etc. But after looking around, can't find much to actually make a search work.
I've tried varitions of the following command(all $ signs are variable name instead of real name), but still either get a bind error, or some other error. Any idea on what else is needed to make this statement work properly, or am I actually doing the search wrong?



ldapsearch -h ldaps://$serverName:$securePort# -p $unsecurePort -P /$var/$var/alias/slapd-cert8.db -Z -D cn=$bindingmanager -j /password/file -D o=com objectclass=top







share|improve this question














My company had an example of a script that performs a search against a secure port.



ldapsearch -h $host -p $port -P /$var/$var/alias/slapd-cert8.db -Z -s base -b "" "objectclass apemdsuffix | grep netscapemdsuffix`;



I'm trying to do a simple search of an ldap database, finding anything with an objectclass of top. I know the root of the database, as well as the port/host etc. But after looking around, can't find much to actually make a search work.
I've tried varitions of the following command(all $ signs are variable name instead of real name), but still either get a bind error, or some other error. Any idea on what else is needed to make this statement work properly, or am I actually doing the search wrong?



ldapsearch -h ldaps://$serverName:$securePort# -p $unsecurePort -P /$var/$var/alias/slapd-cert8.db -Z -D cn=$bindingmanager -j /password/file -D o=com objectclass=top









share|improve this question













share|improve this question




share|improve this question








edited Dec 5 '17 at 22:22

























asked Dec 5 '17 at 22:07









King of NES

1163




1163











  • Can you edit and check the formatting? I think at least some of those backslashes shouldn't be there. Four-space indent for a code block, see the small ? sign at the corner of the edit toolbar
    – ilkkachu
    Dec 5 '17 at 22:18
















  • Can you edit and check the formatting? I think at least some of those backslashes shouldn't be there. Four-space indent for a code block, see the small ? sign at the corner of the edit toolbar
    – ilkkachu
    Dec 5 '17 at 22:18















Can you edit and check the formatting? I think at least some of those backslashes shouldn't be there. Four-space indent for a code block, see the small ? sign at the corner of the edit toolbar
– ilkkachu
Dec 5 '17 at 22:18




Can you edit and check the formatting? I think at least some of those backslashes shouldn't be there. Four-space indent for a code block, see the small ? sign at the corner of the edit toolbar
– ilkkachu
Dec 5 '17 at 22:18















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409047%2fhow-do-you-perform-an-ldapsearch-on-a-secure-port%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409047%2fhow-do-you-perform-an-ldapsearch-on-a-secure-port%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?