LDAP syntax of multiple values SSD in ldapclient command
Hi,
I need assistance with the syntax of multi-value SSDs in a ldapclient command.
Any help or pointing to the right direction/documentation is very appreciated.
I am trying to use the ldapclient command to manually configure a ldap client with multi-value serviceSearchDescriptors.
My goal is to restrict password search to two containers, for instance, ou=nj,o=internal,dc=xx,dc=com and ou=ny,o=internal,dc=xx,dc=com.
According to the Solaris 10 documentation "System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)" a syntax would be to separate the values with semicolon:
serviceSearchDescriptor: passwd:ou=nj,o=internal,dc=xx,dc=com;ou=ny,o=internal,dc=xx,dc=com So, I try the following ldapclient command
# /usr/sbin/ldapclient manual \
-a credentialLevel=proxy \
-a proxyPassword="xxxxxxxxxxx" \
-a proxyDN=frsysentid=xxxxxxxx,ou=xx,ou=xx,o=xx,dc=xx,dc=xx \
-a defaultSearchBase=dc=xx,dc=xxx \
-a authenticationMethod=tls:simple \
-a defaultServerList=xxxx \
-a defaultSearchScope=sub \
-a followReferrals=false \
-a bindTimeLimit=10 \
-a searchTimeLimit=30 \
-a objectclassMap=passwd:posixAccount=organizationalPerson \
-a serviceSearchDescriptor=passwd:ou=nj,o=internal,dc=xx,dc=com;ou=ny,o=internal,dc=xx,dc=com?sub \
-a serviceSearchDescriptor=shadow:ou=nj,o=internal,dc=xx,dc=com;ou=ny,o=internal,dc=xx,dc=com?sub \
-a serviceSearchDescriptor=group:ou=nj,o=internal,dc=xx,dc=com;ou=ny,o=internal,dc=xx,dc=com?sub \
-a serviceSearchDescriptor=netgroup:ou=nj,o=internal,dc=xx,dc=com;ou=ny,o=internal,dc=xx,dc=com?sub
System successfully configured
-bash: -a: command not found
-bash: -a: command not found
-bash: -a: command not foundA "ldapclient list" shows that the error is caused by the SSDs with semicolon separated values.
It seems that the first semicolon truncated the command.
# ldapclient list
NS_LDAP_FILE_VERSION= 2.0
NS_LDAP_BINDDN= frsysentid=xx,ou=xx,ou=xx,o=xx,dc=xx,dc=xx
NS_LDAP_BINDPASSWD= xx
NS_LDAP_SERVERS= xx
NS_LDAP_SEARCH_BASEDN= dc=xx,dc=xx
NS_LDAP_AUTH= tls:simple
NS_LDAP_SEARCH_REF= FALSE
NS_LDAP_SEARCH_SCOPE= sub
NS_LDAP_SEARCH_TIME= 30
NS_LDAP_CACHETTL= 0
NS_LDAP_CREDENTIAL_LEVEL= proxy
NS_LDAP_SERVICE_SEARCH_DESC= passwd:ou=ny,o=internal,dc=frb,dc=org
NS_LDAP_BIND_TIME= 10
NS_LDAP_OBJECTCLASSMAP= passwd:posixAccount=organizationalPerson
#I am having hard time to find out the correct syntax for the ldapclient command to initialiaze the ldap client with multi-value SSDs. The ldapclient man page briefly mentioned that the syntax is described in the "profile IETF draft". But, I can't find this draft documentation.
Of course!
ldapclient command initialized the ldap client as intended after quoting the values of SSD entries.
# /usr/sbin/ldapclient manual \
-a credentialLevel=proxy \
-a proxyPassword="xxxxxxxxxxx" \
-a proxyDN=frsysentid=xxxxxxxx,ou=xx,ou=xx,o=xx,dc=xx,dc=xx \
-a defaultSearchBase=dc=xx,dc=com \
-a authenticationMethod=tls:simple \
-a defaultServerList=xxxx \
-a defaultSearchScope=sub \
-a followReferrals=false \
-a bindTimeLimit=10 \
-a searchTimeLimit=30 \
-a objectclassMap=passwd:posixAccount=organizationalPerson \
-a serviceSearchDescriptor="passwd:ou=nj,o=internal,;ou=ny,o=internal,?sub" \
-a serviceSearchDescriptor="shadow:ou=nj,o=internal,;ou=ny,o=internal,?sub" \
-a serviceSearchDescriptor="group:ou=nj,o=internal,;ou=ny,o=internal,?sub" \
-a serviceSearchDescriptor="netgroup:ou=nj,o=internal,;ou=ny,o=internal,?sub"
System successfully configured
# ldapclient list
NS_LDAP_FILE_VERSION= 2.0
NS_LDAP_BINDDN= frsysentid=xx,ou=xx,ou=xx,o=xx,dc=xx,dc=xx
NS_LDAP_BINDPASSWD= xx
NS_LDAP_SERVERS= xx
NS_LDAP_SEARCH_BASEDN= dc=xx,dc=com
NS_LDAP_AUTH= tls:simple
NS_LDAP_SEARCH_REF= FALSE
NS_LDAP_SEARCH_SCOPE= sub
NS_LDAP_SEARCH_TIME= 30
NS_LDAP_CACHETTL= 0
NS_LDAP_CREDENTIAL_LEVEL= proxy
NS_LDAP_SERVICE_SEARCH_DESC= passwd:ou=nj,o=internal,;ou=ny,o=internal,?sub
NS_LDAP_SERVICE_SEARCH_DESC= shadow:ou=nj,o=internal,;ou=ny,o=internal,?sub
NS_LDAP_SERVICE_SEARCH_DESC= group:ou=nj,o=internal,;ou=ny,o=internal,?sub
NS_LDAP_SERVICE_SEARCH_DESC= netgroup:ou=nj,o=internal,;ou=ny,o=internal,?sub
NS_LDAP_BIND_TIME= 10
NS_LDAP_OBJECTCLASSMAP= passwd:posixAccount=organizationalPerson
#Thank you!
Similar Messages
-
How to pass a multiple value parameter to SQL Command?
Hi,
I created a SQL Command with parameter. But, I need the parameter to be set as multiple value. After creating the SQL Command and it's parameter under the Database Expert, I went to Field Explorer ---> Parameter Fields and found the parameter that I had created for the SQL Command. But when I wanted to edit the parameter to make it a multiple value parameter, the multiple value option was fix grayed as single parameter and I couldn't change it to multiple parameter. Is there any way that I can set a parameter that is attached to SQL Command as multiple value rather than single value? Thanks.
Cheers,
AlAl,
That's a feature that, apparently, is only available in CR 2008. If you are using CR 2008, use this link to see how to do it.
[https://boc.sdn.sap.com/node/19268]
Cheers,
Jason -
Report Builder 2.0 - Filtering multiple values with LIKE command
Hi,
I'm trying to use multiple values for a LIKE command in the Tablix Properties-Filters area. I thought this would be easy, and it may yet prove to be easy yet I'm banging my head against the wall at the moment.
I have created a new filter with:
Expression: Campaign
Operator: Like
Value: 02A*
So, I only want the Campaign codes returned that start with 02A. Now, this on it own works fine, the issue begins when I want to add in the Campaigns beginning with 02K. I have tried adding a separate new filter underneath the first as well as using the
OR command, yet, nothing is working correctly. When adding a separate filter it appears to work as an AND in conjunction with my first filter for 02A, but needs to work independently as an OR.
Any help much appreciated.
MikeHi Mike,
Based on my research, this should be a product issue in Report Builder 2.0. In your scenario, you should use “true” (without the quotes) to replace “True”. While changing True to true cannot work via UI since the UI will automatically change the true to
True again. To work around this issue in Report Builder 2.0, you have to modify the True to true in the code view mode.
After testing the issue in my environment again, I find another way to fix this issue. Please see:
Expression: =(Fields!Campaign.Value like "02A*") OR (Fields!Campaign.Value like "02K*" )
Type: Text or Boolean (Boolean type will automatically change to Text type)
Operator: =
Value: =true
Btw, this issue has been fixed in Report Builder 3.0, the filter which you posted will be work great in Report Builder 3.0.
If you have any other question, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How can i pass multiple values by a single variable to EXECUTE IMMEDIATE
Hi All,
I want to pass multiple values for where condition for execute immediate. Something Like this:-
bold
Declare
v_cond varchar(1000);
Begin
v_cond := '''INR','USD'''; --(OPTION 1)
v_cond := 'INR,USD'; --(OPTION 2)
EXECUTE IMMEDIATE 'Delete from table where colm in (:v_cond)' using v_cond;
END;
bold
I am using this into a procedure
Now option 1 gives an error ie a syntax error (; expected or something like that)(I am sorry, i can't tell the exact error here as i am not in the office right now)
and option 2 makes the procedure execute but obviously doesn't delete the records, as it takes the whole as one.
Please Help
Regards
Neeraj BansalSee the links containing examples under
*7. List of values in an IN clause?*
SQL and PL/SQL FAQ
from the SQL and PL/SQL FAQ. -
Dynamic sql reurns no data when multiple values are passed.
(Dynamic sql returns no data when multiple values are passed.)
Hi,
While executing the below dynamic sql in the procedure no data is returned when it has multiple input values.
When the input is EMPID := '1'; the procedure works fine and returns data.Any suggestion why the procedure doen't works when input as EMPID := '1'',''2'; is passed as parameter?
=======================================================
create or replace PROCEDURE TEST(EMPID IN VARCHAR2, rc OUT sys_refcursor)
IS
stmt VARCHAR2(9272);
V_EMPID VARCHAR2(100);
BEGIN
V_EMPID :=EMPID;
stmt := 'select * from TEST123 where Empid is NOT NULL';
IF V_EMPID <> '-1' THEN
stmt := stmt || ' and Empid in (:1)';
ELSE
stmt := stmt || ' and -1 = :1';
END IF;
OPEN rc FOR stmt USING V_EMPID;
END Z_TEST;
============================================================
Script for create table
==================================================================
CREATE TABLE TEST123 (
EMPID VARCHAR2(10 BYTE),
DEPT NUMBER(3,0)
===========================================
Insert into PDEVUSER.TEST123 (EMPID,DEPT) values ('1',20);
Insert into PDEVUSER.TEST123 (EMPID,DEPT) values ('2',10);
Insert into PDEVUSER.TEST123 (EMPID,DEPT) values ('3',30);
Insert into PDEVUSER.TEST123 (EMPID,DEPT) values ('3',30);
Insert into PDEVUSER.TEST123 (EMPID,DEPT) values ('2',10);
=============================================
Select * from TEST123 where Empid in (1,2,3)
EMPID DEPT
1 20
2 10
3 30
3 30
2 10
===================================================================
Any suggestion why the procedure doen't works when input EMPID := '1'',''2';?
Thank you,The whole scenario is a little strange. When I tried to compile your procedure it couldn't compile, but I added the missing info and was able to get it compiled.
create or replace PROCEDURE TEST (EMPID IN VARCHAR2, rc OUT sys_refcursor)
IS
stmt VARCHAR2 (9272);
V_EMPID VARCHAR2 (100);
BEGIN
V_EMPID := EMPID;
stmt := 'select * from TEST123 where Empid is NOT NULL';
IF V_EMPID = '-1' THEN
stmt := stmt || ' and Empid in (:1)';
ELSE
stmt := stmt || ' and -1 = :1';
END IF;
OPEN rc FOR stmt USING V_EMPID;
END;If you pass in 1 as a parameter, it is going to execute because the statement that it is building is:
select * from TEST123 where Empid is NOT NULL and -1 = 1Although the syntax is valid -1 will never equal 1 so you will never get any data.
If you pass in 1,2 as a parameter then it is basically building the following:
select * from TEST123 where Empid is NOT NULL and -1 = 1,2This will cause an invalid number because it is trying to check where -1 = 1,2
You could always change your code to:
PROCEDURE TEST (EMPID IN VARCHAR2, rc OUT sys_refcursor)
IS
stmt VARCHAR2 (9272);
V_EMPID VARCHAR2 (100);
BEGIN
V_EMPID := EMPID;
stmt := 'select * from TEST123 where Empid is NOT NULL';
stmt := stmt || ' and Empid in (:1)';
OPEN rc FOR stmt USING V_EMPID;
END;and forget the if v_empid = '-1' check. If you pass in a 1 it will work, if you pass in 1,2 is will work, but don't pass them in with any tick marks. -
Passing multiple values to a single input parameter
Hi folks,
I have a Microstrategy query successfully passing input parameter to a calculation view. For example I can pass a movement type to a material movements calculation view input parameter. However if I try to pick more than one movement type the query then fails;
Generated SQL that works looks like this;
select
sum(a11.TOTALQUANTITY) WJXBFS1
from
"_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', '101')
a11
When choosing more than one value in Microstrategy the SQL now fails and looks like this;
select
sum(a11.TOTALQUANTITY) WJXBFS1
from
"_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', '101'),
'PLACEHOLDER' = ('$$MoveType$$', '103'))
a11
If I cut and paste the SQL and run directly in HANA studio the error is;
Could not execute 'select sum(a11.TOTALQUANTITY) WJXBFS1 from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER" ...' in 66 ms 361 µs .
SAP DBTech JDBC: [2048]: column store error: search parameter error: [2018] A received argument has an invalid value;TABLE/VIEW parameter: ( 'PLACEHOLDER'='$$MoveType$$, 103') not supported
Is it possible to pass multiple values in a single parameter? I'm using SP67 for this test.
Thanks,
-PatrickRavi, also to answer one of your questions about how this will work in Microstrategy; I just heard back from my Microstrategy developer and he is trying MSTR Freeform SQL query with syntax like this;
select (sumPAR_TEST.TOTALQUANTITY TOTALQUANTITY
from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' =('$$MoveType$$', '[Movement Type]')) PAR_TEST
In this example [Movement Type] is the microstrategy prompt. Unfortunately though it translates like this which is missing extra single quotes around each value;
select sum(PAR_TEST.TOTALQUANTITY) TOTALQUANTITY
from "_SYS_BIC"."development.pr1959/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', ''101', '102'')) PAR_TEST
instead of what we need which is;
('PLACEHOLDER' = ('$$MoveType$$', '''101'', ''102''')) PAR_TEST
So at this point we are not sure if this will be possible or not.
-Patrick -
Passing multiple values to the QUERY BDOC parameter?
hi All,
Below is my Query BDOC Anchor Before Query Execute even handler... I'm trying to pass multiple values to the bq.Z_PartnerFunction query parameter... i.e.
PARTNER_FCT in( '00000012','ZDIVMGR','ZAREADR')
is it possible without creating new Query Bdoc ?
====================================
Private Sub aempchoicewinTCWSearchTAnchor_beforeQueryExecute(ByRef bq As BusinessQuery, ByRef cancel As Boolean)
If Not bq Is Nothing Then
If sWcDummy = "Yes" Then
bq.WcDummy = sWcDummy
End If
bq.Z_PartnerFunction = "00000012"
If ctrlZ_Territory.Value <> "" Then
bq.PRNB_TerrID = "*" & ctrlZ_Territory.Value
End If
End If
End Sub
================================
Thanks in advance
HetalHi,
it looks that you already enhanced the query BDoc because you have a new query parameter bq.Z_PartnerFunction, right?
To which BDoc parameter is this BQ parameter mapped? And how looks the related where clause?
For a single filter normally a "=" operator is used. Therefore your example with "in" won't work.
If these three partner functions are fixed then you might hardcoded them directly in the where clause (supposed the BDoc is not used somewhere else where you don't want to have this filter).
Or you might add 3 new BDoc parameters, add 3 new where clauses using a disjunction for them (and using an embracing bracket). In this case always all these 3 BQ parameters need to be filled (or all stay empty) to avoid a SQL syntax error.
Regards,
Wolfhard -
Report script - using substitution variable with multiple values
Hi All,
Substitution variable with multiple values is not working correctly with Report scripts. Can you please let me know what is the syntax to assign multiple values to a sub variable using maxl:
alter database samp.samp set variable 'ExtractQuarter' 'Q1,Q2,Q3,Q4';
alter database Samp.Samp set variable 'ExtractQuarter' 'Q1:Q4';
I tried both of the above but they are errored out with the below error:
Error: 1001005 - Unknown Member [Q1:Q4] in Report.
my requirement is different for both Actual and forecast data extract so i would like to make use of this variable to extract whole year data for Forecast and current quarter data for Actual with out duplicating the report scripts for both processes.
Thanks,
PRaveenHi,
Please refer following thread,
range of months in report script?
Hope it helps.
Regards -
Multiple values in Presentation Variable
Hi All,
I have a requirement like this. I have a report that report is Direct Database request. I want to pass the multiple values from the prompt in to the Direct database request report.
The single values is already passed in the direct database report with this syntax (@{PresentationVariable Name}). But when i tried to select multiple values from the prompt it doesn't work.
So can someone have any idea or any workaround how it can be achievable. My version of OBIEE is 11g.
Regards
Ashishuse something like below in DDB req
Column in '@{PresentationVariable Name}'
just save it and test with prompt value using db page. -
Re : Multiple values resut of CASE statement
Hello All,
Hope all is well. I was trying to basically return multiple values if a certain value 'X' was passed. for example,
select
case T1.C1
when 'X' then ('XX','YY')
else T1.C1
end
from T1
but I am getting error. I am unable to figure out as to how do you get multiple values out of a single value in SQL. I will then be passing this multiple values as filter in where clause. For example,
where ('XX','YY') in T2.C1
Thanks in advance and let me know if I have missed on something.
- SamHello Frank,
Thanks for the response. You are correct , when value happens to be 'X' then I want to pass ('XX','YY') ( result of sub query) to the outer query. In essense, I want to pass multiple values to the outer query when a specific value is 'X'.
For Example,
I want query to be
select T1.C1,T1.C2
from T1
where T1.C1 in ('XX','YY') // When the value of T2.C1 happens to be 'X'
Let me know if I am clear here ..... The query throws no syntax error but does not return any data ...when there is data for T1.C1 in ('XX','YY') in DB. If I ran the query as is as posted above , query does return data but when it is ran as sub query as mentioned in previous posts , the query does not return any data !!!! ..thats where I am puzzled.
Thanks again,
Sam
Edited by: user588790 on Jan 29, 2009 12:38 PM -
Multiple values in a user record field and Address Book
Hi
I'm working out a method of importing multiple users into an LDAP directory on OS X 10.4.4, and I've hit an interesting snag.
When you export a user from Workgroup Manager, any fields in the user record that contain multiple values (multiple email addresses, work phone numbers, etc) contain their values separated by commas. For example:
username::::[email protected],[email protected]:::
However, when I view that LDAP entry in a networked Address Book, it only displays the first value, not the second or subsequent values. I've changed the Address Book template to specify multiple emails/phone numbers, but that doesn't do it.
If I create my own import file, and pull it into Workgroup Manager, they import correctly into the user record, so I don't think I'm doing anything wrong on the server side.
Does anyone know how to make Address Book display all the values?
Thanks
Mattif i'm not remembering read stuff wrong, these fileds have quite alot of limitations. and i think multiple values per field is such a limitation.
-
SQL Command code for multiple value string parameter
Hi,
I'm using crystal 2008 and there is a check box for multiple value SQL Command I need some help in writing the SQL Command code for oracle (or sql server) for a multiple value STRING parameter.
Thanks in advance,
MarilynI could be wrong here, but I do not believe you can pass a multiple valued parameter to an SQL Command data source. How I have gotten around this in the past is to put the "real" report into a subreport. In the main report, create a formula field (basic syntax):
formula = join({?parameter}, "|")
Then, use this to pass the selected values to the subreport's parameter (call it {?sr-parm}). The SQL Command in the subreport can then use that (MS SQL):
select *
from table
where charindex(table.field, '{?sr-parm}') > 0
HTH,
Carl -
Multiple value selection lists - Problem filtering
I'm builing a news application with publisher, and one of the fields is a multiple value selection list. We're filtering news stories to different pages based on the values. Problem is, I can't get the right content items to display. I did it no problem with a single selection box. The code I'm using is:
<pcs:foreach expr="folderByPath(folder, '../../Articles')" var="articles">
<pcs:foreach expr="articles" var="art">
<pcs:if expr="art.testkeyword == 'choice2'">
</pcs:value>"><pcs:value expr="art.headline"></pcs:value></a><br />
</pcs:if>
</pcs:foreach>
</pcs:foreach>
So if 'choice2' is in a single select list, no problem. If it's part of a multiple select, I get nothing. I'm thinking I'm missing something really easy, like logic operators. But I couldn't find anything of help in the documentationHi,
Make use of contains function.
Syntax : contains(string1,string2) this returns true if string 1 has string 2
Usage
<pcs:if expr="contains(test,'A')">
</pcs:if>
** 'test' is the name of the multi select box
Edited by bharatkarthik at 06/22/2007 4:10 PM -
Multiple values in querytext REST SharePoint search
I'm trying to put multiple values in querytext in my rest call to SP search.
This is my url: "/_api/search/query?querytext='" + queryText + "'";
queryText can contain several values, and I need to add OR between them.
I want the queryText to be value1+OR+value2+OR+value3, the var queryText will be filled (data from another source) with 'value1+OR+value2+OR+value3' etc but if there is only one value return from the other source it should just
be this.
Code:
var queryText;
if (dataFromOtherSource.length = 1) {
queryText = dataFromOtherSource[0].Title;
else {
for (var i = 0; i < dataFromOtherSource.length; i++) {
queryText += dataFromOtherSource[i].Title + '+OR';
The thing is here, even the last of dataFromOtherSource gets +OR after, so the rest returns an error.
Is there any bette way to solve this?Now, using http://sp2013searchtool.codeplex.com/, I've found the syntax by chance.
It should be like:
..query?querytext='path=path1+path=path2'source:http://stackoverflow.com/questions/17697540/sharepoint-rest-query-with-multiple-variable-for-a-query-tag -
LRM-00112: multiple values not allowed for parameter 'query'
Hello,
I am getting below error while trying to execute below query...please help:
exp username/password file=query.dmp log=query.log tables=schema_name.tablename query=\"where PRODUCT_KEY IN\'4541450,4541455,4541475,4541504,
4541505,4674142,4674201,4674202,4673982,4674000,4674114,4674118,4654432,4715806,4715807,4716122,4716133,4870247,5321008'/"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfullyyeah i have tried using paranthesis as well...it has given below error then:
exp schema/password file=query.dmp log=query.log tables=schema_name.table_name query="where PRODUCT_KEY IN (4541450,4541455,4541475,4541504,4
541505,4674142,4674201,4674202,4673982,4674000,4674114,4674118,4654432,4715806,4715807,4716122,4716133,4870247,5321008)"
./export.ksh: syntax error at line 1 : `(' unexpected
Maybe you are looking for
-
Webpart OpenXML docx chunk HTML BOM
I am inserting html text into a docx word document. All works okay except the end result docx file has a BOM at the beginning of the document.xml. I do not understand this although I suspect an encoding issue. Example code below. Would appreciate any
-
Can we call a sqlldr through stored procedure given by two filename as input parameters. if so some links so that i can do my procedure is Create procedure test (file1 varchar2,file2 varchar2) is begin sqlldr username@sid/password control = file1; sq
-
Restoring with Time Capsule.
I have been having some issues with my computer wanting to shut down with the grey screen lately. And I want to format and reinstall my OS and start fresh.. My questions are as follows: When I do this can I restore partial files back on to my machine
-
Error message "ISWUIlib.dll missing each time I start Firefox
This error comes up each time I open Firefox. I go on and Firefox works fine. == This happened == Every time Firefox opened
-
What is the distance range that Cisco Access points can cover in metres,km or feet. eg. how much distance does cisco 1524 AP or a Work group bridge cover? Where can we find the figures associated with each cisco access point model. Thanks in advance!