Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
J.C. #1
Re: CFLDAP and searching members of a group
First, change the delimiter in your query that polls the group members by
adding separator=?|?:
Example:
<cfldap action="QUERY" name="GETGROUPMEMBER" attributes="member"
start="#GETDOMAININFO.STARTVARIABLE#" scope="SUBTREE" startrow="1"
maxrows="100000" filter="dn=<insert distinguished name>" separator=?|?
server="#GETDOMAININFO.DOMAINSERVER#" port="389" timeout="20"
username="#GETDOMAININFO.DOMAINADMINISTRATOR#"
password="#GETDOMAININFO.DOMAINPASSWORD#">
Second, use CFLDAP to get the "dn" or distinguished name (The CN name you
refer to) by using filter="samAccountName=<enter samaccount name here>".
Example:
<cfldap action="QUERY" name="GETVALUE" attributes="dn"
start="#GETDOMAININFO.STARTVARIABLE#" scope="SUBTREE" startrow="1"
maxrows="100000" filter="samAccountName=<insert samaccount name>"
server="#GETDOMAININFO.DOMAINSERVER#" port="389" timeout="20"
username="#GETDOMAININFO.DOMAINADMINISTRATOR#"
password="#GETDOMAININFO.DOMAINPASSWORD#">
Lastly, check to see if the "dn" is in the "member" attribute of your group.
Use LISTFINDNOCASE(GETGROUPMEMBER.MEMBER, GETVALUE.DN, "|") to search the
member attribute for the matching dn you got from the query above.
JC
J.C. Guest
-
AD and adding group members via CFLDAP
I posted this over in Advanced techniques with only one brave, yet unfortunately uninformed taker... Anyone here have a clue as to why I'd get the... -
May 29 Sydney Developers Group study group
On Monday 29th May, we'll be studying Actionscript 3. Please read the articles prior to the meeting (see <a target=_blank... -
CFLDAP
Hi, I've never used this tag before and its causing me some problems. (see attached code) Regarding the start attribute what does 'cn' and 'c'... -
CFLDAP to ASP
Does anyone know how to convert the following CFLDAP code to ASP? I have had no luck. <cfldap action="query" name="testldap"... -
group 2 members into one
Hi, is it possible to group 2 castmembers into one? i want to group a vector member with field member to one complete member. is this... -
JoeyTMann #2
Re: CFLDAP and searching members of a group
actually what I did was...
<cfldap
action="QUERY"
name="finduser"
attributes="memberof"
start="DC=mydomain"
scope="subtree"
filter="samaccountname=#session.userid#"
server="127.0.0.1"
username="joeblow"
password="*******"
separator=";">
<cfset Users = #ValueList(finduser.memberof, ";")#>
<!--- this shows the number position of the group in the list, returns 0 if
not in the list--->
<cfset showSUAuser = #ListContainsNoCase(Users,"CN=blahblah",";")#>
Then i just check to see if showsuauser is not 0 and away we go. Simple and it
works. Nice thing is I can search for multiple groups this way.
JoeyTMann Guest



Reply With Quote

