w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
external ldap client for wso2 Identity Server to authenticate external ldap users
You can check the IS documentation on how to connect to external LDAP server . If you have successfully connected to external store, then authentication will happen against that usertore.. What is the issue you faced when you authenticate with the external LDAP user store? You can file a bug report..

Categories : Wso2

Show members of members group
Have you looked at function bp_group_has_members in buddypressp-groupsp-groups-template.php ? You can't pass a string '$group' to bp_group_has_members. Try: $this_id = bp_get_group_id(); echo "group id is: " . $this_id; // make sure there is a value here. $has_members_str = "group_id=" . $this_id; if ( bp_group_has_members( $has_members_str ) )

Categories : Wordpress

Facebook API: Is it possible to get number of posts in group and group them by members?
All those things are not possible with the Graph API (at least not at the moment), and FQL is deprecated. The only way to do this is to get all entries (with paging) with the /group-id/feed endpoint and do the counting on your own with PHP.

Categories : PHP

LDAP return all users in different groups in AD with PHP
The Query limit is what made me believe it wasn't searching the subroots when it actually just couldn't get that far due to the limit. As this was for a directory I just made the search parameters have more depth so they returned less.

Categories : PHP

WSO2 Cluster Manager - Not all the members of the Group ,are shown as members in the Group of Cluster Manager feature. in WSO2 greg cluster uI
If you are using WKA membership scheme, you have to specify the host names and the ports of all the members who will be joining the cluster. Instead you have specified only the master and the greg. But you ideally need to specify all the masters and workers hosts and ports under members element. Hope I have resolved your concern. Manisha

Categories : Wso2

Ldap filter to search for users in a given domain (using powershell)
I think the following filter should work: (&(objectCategory=person)(objectClass=user)(dc:dn:=mytestlab)(dc:dn:=com)) The filter above is called an extensible match search because it specifies an attribute name: dc and the DN’s attributes should be considered as part of the entry.

Categories : Powershell

LDAP user/group operations
For scenario #1, you can get the list of users with designation set (e.g with search filter ((objectclass=yourUserClass)(designationAttribute=*)), then retrieve the Member group and figure out who is missing For scenario 2, you can easily extract those user entries without designation attribute with the following search filter ((objectclass=yourUserClass)(!(designationAttribute=*)) , then you can remove them from the Member group if needed.

Categories : Misc

Checking for group membership in Active Directory using LDAP and PHP
I am not familiar with PHP's implementation of accessing LDAP/Active Directory so I can't help you there. What I can help you with is perhaps understanding where to get information from your domain structure in order to coherently assemble all those CN's, OU's, DN things. Log into the console of one of your domain controllers and open the "Active Directory Users and Computers" administrator tool. In the left window pane at the top will be the name of your domain, eg: somedomain.com Take note of your domain name. Now you need to find the location of the ECSDocket_Admin, ECSDocket_User, and ECSDocket_Viewer group objects within your domain structure. Click on the +(plus) sign next to your domain name (if it isn't already). You should see a bunch of folders (actually OU's and Directory'

Categories : PHP

Search a LDAP group name that contains extra Closed Bracket
Quoting the MSDN docs: Special Characters. If any of the following special characters must appear in the search filter as literals, they must be replaced by the listed escape sequence. ASCII character   Escape sequence substitute: *   2a (   28 )   29   5c NUL   0 /   2f Here you have the code to perform escape: http://stackoverflow.com/a/694915/986161

Categories : C#

ldapmodify - can't add members to AD group
Find a user without a Comma in their DN and try it again that way. It is saying the referenced object does not exist. Now I am not sure if it is the DN: CN=Smith, John, OU=Users, DC=example, DC=com (The member being added) or the group DN: CN=group_name, OU=Groups, DC=example, DC=com Looking at the member DN being added, the comma (properly escaped, I would say) is easy enough to test and eliminate from being an issue if it was.

Categories : Linux

Powershell - Append Group Name and Members
#Create Custom Data Container $header = @("Group,Member") #Columns $temp = @() $data = @() $data += $header $SearchBase = "OU=Groups,DC=domain,DC=local" Get-ADGroup -filter * -SearchBase $SearchBase | % { #For Each Group $Groups = $_.name get-ADGroupMember -Identity $groups | % { #For Each Member $Members = $_.Name #Add Row $temp = "$Groups,$Members" $data += $temp } } #output data to csv $data | ConvertFrom-Csv | Export-Csv -Path c:inmembersof.csv -NoTypeInformation

Categories : Powershell

Optimize AD search - get group members
I would suggest using the the lower level DirectoryServices.Protocols namespace instead of DirectoryServices.AccountManagement for something like this. The problem I've had (along with many others) with the AccountManagement libraries is the lack of customization and configuration. That being said, this is how I search through Active Directory, making use of System.DirectoryServices.Protocols.SearchScope as well. //Define the connection var ldapidentifier = new LdapDirectoryIdentifier(ServerName, port); var ldapconn = new LdapConnection(ldapidentifier, credentials); //Set some session options (important if the server has a self signed cert or is transferring over SSL on Port 636) ldapconn.SessionOptions.VerifyServerCertificate += delegate { return true; }; ldapconn.SessionOptions.Secur

Categories : C#

MySQL: SELECT if non of group by members is equal to x
You can try like this...it will return all order id which never had status -example Select Order_id, from TableName A where Not Exists( Select id from TableName B where status='example' and a.Order_id=b.Order_id ) group by Order_id

Categories : Mysql

Providing admin actions to group members in a multi tenant django CRM application
YMMV but my own experience is that django-admin is a PITA to customize beyond simple things, and that I get better results writing a custom interface when the users needs are anything more than simple low-level CRUD (and don't get me wrong, django-admin is really great). Now restricting which ModelAdmins are available to a given user and restricting the ModelAdmins querysets according to the current user is definitly not a problem in django-admin so if that's all you need you can always start that way and only start writing your own admin interface when you find the domain requires something more complex / specialized than what django-admin provides.

Categories : Python

Dropdown menu hover causes all other members of parent-child group to change color
Under hover styles in this stylesheet, there's a rule setting the text color to grey. I would bet it's that one. /* Hover Styles */ .jbmm.custom ul.mega-menuh li.mega-hover a, .jbmm.custom ul.mega-menuh li a:hover {background-position: 100% -40px; color: #333 !important; text-shadow: none;} .jbmm.custom ul.mega-menuh li.mega-hover a .dc-mega-icon {background-position: 0 100%;}

Categories : CSS

Python-ldap ldap.initialize rejects a URL that ldapurl considers valid
You can programatically encode the last part of the URL: from urllib import quote # works in Python 2.x from urllib.parse import quote # works in Python 3.x url = 'ldap://192.168.2.151/dc=directory,dc=paralint,dc=com' idx = url.rindex('/') + 1 url[:idx] + quote(url[idx:], '=') => 'ldap://192.168.2.151/dc=directory%2Cdc=paralint%2Cdc=com'

Categories : Python

Why do the members of my list get overwritten with the last member of said list?
You're creating a single TblInfo object, and then changing the properties on each iteration. Your list contains lots of references to the same object. Just move this line: TblInfo CurrentTableInfo = new TblInfo(); to the inside of the first loop, and this line: ClmnInfo CurrentColumnInfo = new ClmnInfo(); inside the nested foreach loop, so that you're creating new instances on each iteration. Next: Important Make sure you understand why it was failing before. Read my article on references if you're not sure how objects and references (and value types) work in C# Use camelCased names instead of CamelCased ones for local variables Consider using an object initializer for the ClmnInfo Change your type names to avoid unnecessary abbreviation (TableInfo, ColumnInfo) Change your propert

Categories : C#

Java spring LDAP - Waring LDAP password expire
Credentials expiration date and time Getting the date and time at which the password was last changed: private final static long DIFF_NET_JAVA_FOR_DATE_AND_TIMES = 11644473600000L; long adDateTime = Long.parseLong(pwdLastSet); long milliseconds = (adDateTime / 10000) - DIFF_NET_JAVA_FOR_DATE_AND_TIMES; Date pwdLastSetDate = new Date(milliseconds); Getting the number of max days that could have the password: private final static int ONE_HUNDRED_NANOSECOND = 10000000; private final static long SECONDS_IN_DAY = 86400; long maxPwdAge = Math.abs(Long.parseLong(maxPwdAgeStr)); long maxPwdAgeSecs = maxPwdAge / ONE_HUNDRED_NANOSECOND; int maxPwdAgeDays = (int) (maxPwdAgeSecs / SECONDS_IN_DAY); Getting the the date and time at which the password will expire Calendar cal = Calendar.getInstan

Categories : Java

Can't redirect users to log in page when attempting to access a members only page
Turns out I was on the right track. All I needed to do was modify the authentication module from: <authentication mode="Forms"> <forms name=".ASPXFORMSAUTH" loginUrl="~/Account/Login" defaultUrl="~/" /> </authentication> to: <authentication mode="Forms"> <forms name=".ASPXFORMSAUTH" loginUrl="~/Account/Login.aspx" defaultUrl="~/" /> </authentication> The simple mistakes get me every time.

Categories : Asp Net

How do I find all the roles a user has in LDAP using the UnboundID LDAP SDK?
Use the following function. Assumption that you works with SUN LDAP (you use uid): Edited private boolean isGroupContainUser(LDAPConnection ldapConnection, String groupDn, String userDn) throws LDAPException { boolean ret = false; Entry groupEntry = ldapConnection.getEntry(groupDn); String[] memberValues = groupEntry.getAttributeValues("uniquemember"); if (memberValues != null) { DN ldapUserDn = new DN(userDn); for (String memberEntryDnString : memberValues) { DN memberEntryDn = new DN(memberEntryDnString); if (memberEntryDn.equals(ldapUserDn)) { ret = true; break; } } } return ret; }

Categories : Java

CakePHP: Can't login when using Members Controller instead of Users Controller
Have you read this? If not do it now. The example there is pretty clear: $this->Auth->authenticate = array( 'Basic' => array('userModel' => 'Member'), 'Form' => array('userModel' => 'Member') ); You have to specify the model the Form authentication adapter should use. For the redirect issue, define $this->Auth->redirectUrl = array(/* Whatever you need here */);

Categories : Cakephp

Per group, find first N users with SUM(x) >= N
In order to find the users that meet your needs, you need the cumulative sum of the counts. The following query finds the occasions when a user first reaches 10 units. If the counts are never negative, then there is only one: select i.* from (select i.*, (select sum(items_count) from items i2 where i2.user = i.user and i2.category = i.category and i2.datetime <= i.datetime ) as cumsum from items i ) i where cumsum - items_count < 10 and cumsum >= 10 order by datetime; To get the first two, you need to use MySQL tricks for counting within a group. Here is an example that generally works: select i.* from (select i.*, if(@prevc = category, @rn := @rn + 1, @rn := 1) as rn, @

Categories : Mysql

get distinct list of cities from Active Directory via ldap
you need to perform a paged search operation to return more data than the default 1000 limit per query. Paged search works so that it still gets 1000 items per query but the server remembers where your search stopped, sends you a cookie and you can use this cookie later for subsequent search requests. The server will then return another 1000 items, and so on, until the server returns empty cookie -> the resultset is complete. This usually takes some amount of code to get all things right. I would recommend that if you plan to do more with ldap take a look at some well-established libraries for php, like adLDAP or AD-X. As for the search query itself, I recommend going the following way: You perform a search for all users who have the l attribute filled in: (&(objectcategory=person)

Categories : PHP

How can I select the users which are belonging to group A?
I think you can use a INNER JOIN query SELECT p.name,p.sex FROM User p INNER JOIN fos_user_user_group b ON a.ID = b.user_id INNER JOIN fos_group c ON b.group_id = c.ID WHERE c.group_id = '1'

Categories : Mysql

Ion auth only show users in certain group
At first get groups logged user. $user_in_group = $this->ion_auth->get_users_groups(); // Return array groups And get user list that have same group with logged user $this->data['users'] = $this->ion_auth->users($user_in_group)->result(); // Pass groups array as params And users listed only have logged user group.

Categories : PHP

Add users to interest group via MailChimp API v2.0
Well, I figured it out. Although I could have sworn I'd already tried it this way... the groups have to be an array, even for a single group. My code now: $merge_vars = array( 'GROUPINGS'=> array( array( 'id' => 17385, 'groups' => array($post['listName']) ) ) ); $mc->lists->updateMember(self::$mainListID, $email, $merge_vars); Works perfectly.

Categories : PHP

SQL Group By Number Of Users Within Range
You can use a CASE expression inside of your aggregate function which will get the result in columns: SELECT COUNT(case when amount >= 0 and amount <= 100 then users.id end) Amt0_100, COUNT(case when amount >= 101 and amount <= 200 then users.id end) Amt101_200, COUNT(case when amount >= 201 and amount <= 300 then users.id end) Amt201_300 FROM transactions LEFT JOIN users ON users.id = transactions.user_id; See SQL Fiddle with Demo You will notice that I altered the ranges from 0-100, 101-200, 201-300 otherwise you will have user ids being counted twice on the 100, 200 values. If you want the values in rows, then you can use: select count(u.id), CASE WHEN amount >=0 and amount <=100 THEN '0-100' WHEN amount >=101 and amount <=200

Categories : Mysql

Cannot use an aggregate or a subquery in an expression used for the group by list of a GROUP BY clause
You are using the HAVING clause like a WHERE clause. That is, you are trying to enforce data constraints that are NOT on aggregate or GROUP BY expressions. Move them to your WHERE clause instead. SELECT ( SUM(DWXP050.Premp) ) FROM DWXP050 LEFT JOIN [DWXP050 GL Class] ON [DWXP050 GL Class].Policy = DWXP050.Policy AND [DWXP050 GL Class].CDDESC = DWXP050.CDDESC AND [DWXP050 GL Class].TRDATE = DWXP050.TRDATE AND [DWXP050 GL Class].[Effective Date] = DWXP050.EFFDTE AND [DWXP050 GL Class].ASLOB = DWXP050.ASLOB AND [DWXP050 GL Class].AGENT = DWXP050.AGENT WHERE (( ( DWXP050.TRANS ) = '10' OR ( DWXP050.TRANS ) = '20' )) AND ( ( ( [DWXP050 GL Class].AGENT ) = '00000BP001' ) AND ( ( [DWXP050 GL Clas

Categories : SQL

How do I return the index of a group of values from a list for a specific value in the group?
You can use next and enumerate: >>> list1 = [(12, "AB", "CD"), (13, "EF", "GH"), (14, "IJ", "KL")] >>> next(i for i,x in enumerate(list1) if 13 in x) 1 With a simple for-loop: for i, item in enumerate(list1): if 13 in item: print i break ... 1 Update: If the first item in each tuple is unique and you're doing this multiple times then create a dict first. Dicts provide O(1) lookup while lists O(N) >>> list1 = [(12, "AB", "CD"), (13, "EF", "GH"), (14, "IJ", "KL")] >>> dic = {x[0]:x[1:] for x in list1} Accessing items: >>> dic[12] ('AB', 'CD') >>> dic[14] ('IJ', 'KL') #checking key existence >>> if 17 in dic: #if a key exists in dic then do something #then do something

Categories : Python

Using Groupby to group a list and then group them again then based on a quantity
Basic idea: Sort groups by quantity. Iterate through from both sides, combining groups that add up to no more than max quantity. Pseudo-code: sort groups by quantity (biggest group first) i = 0 j = groups.size-1 while i <= j // if the indices met, pick either // if the two groups are larger than max quantity, simply pick the larger one if i == j || union(groups[i], groups[j]).size > maxQuantity output groups[i] i++ else output union(groups[i], groups[j]) i++ j-- If the elements are unique: union(groups[i], groups[j]).size = groups[i].size + groups[j].size LINQ? This is most likely beyond the capabilities of LINQ. As for the C# code, it should be simple enough to derive from the pseudo-code.

Categories : C#

Sql query how to get number of users group by city
If you want the distinct users for each city: select city, count(distinct username) TotalUsers from users group by city; See SQL Fiddle with Demo. The result is: | CITY | TOTALUSERS | ---------------------- | city1 | 2 | | city2 | 1 | | city3 | 1 |

Categories : SQL

Check users in a security group in SQL Server
Accepted answer from DeanG is the preferred solution for getting this info within SQL Server You can use Active Directory tools for this. I like Active Directory Users and Computers that is part of the Remote Server Administration Tools. Follow the link to download and install the tools on Windows 7. Once installed, you can search for a specific group name: Then you can see group membership using the Members tab: If you don't want to use the AD browser packaged with RSA tools, there are several others available.

Categories : SQL

New to C#. How to use google-admin-sdk (add users, add user to group a.s.o.)?
This is fixed now! split the list().Execute() like this! Got help from @peleyal var listReq = service.Users.List(); listReq.Domain = domain; Users results = listReq.Execute();

Categories : C#

App pool identity, Users group and iis isolation
This question is also answered in the answer you linked to, by Kev. You should preferably set up your web root on a separate non-system drive. There you can remove the Users group from the top level and grant rights to the home folder of each site to the respective application pool identities only.

Categories : Security

Create new users with the same group(s) as the user logged in
there are several way you could do this... I'd recommend adding the groups once validation for the other fields has taken place, and the user object has been saved; so you can override the save() function of the form and add them there: <?php class YourUserForm extends PluginsfGuardUserForm { /** * A class variable to store the current user * @var sfGuardUser */ protected $current_user; public function configure() { // Remove all widgets we don't want to show unset( $this['is_super_admin'], $this['updated_at'], $this['groups_list'], $this['permissions_list'], $this['last_login'], $this['created_at'], $this['salt'], $this['algorithm'] ); // save the currrent user for use later in the save function $t

Categories : Symfony2

'DOMAINDomain Users' group becomes 'SERVERNone' in Security Tab
it's clear. because you used a clone machine and joined it to the same domain as the source machine. so these machines had same SID。 you should sysprep the cloned machine before joining the domain;

Categories : Security

How to add and compare members in a list
First, you can simplify your code considerably by moving some of your unifications from the body to the head. is_multi([]). is_multi([X/N|Tail]) :- integer(N), N > 0, is_multi(Tail). Cleaning it up reveals one thing you're not doing here which is in your spec is checking that X is an atom. Fix by adding atom(X) to the body. OK, so this takes care of the basic form, but doesn't ensure that the atoms do not repeat. The simplest thing to do would be to split this into two checks, one that checks that each item is well-formed, and one that checks that the list is well-formed. In fact, I would be inclined to use maplist/2 with a predicate that checks a single element. But all you really have to do is something like this: is_valid([]). is_valid([X/_|T]) :- is_valid(T), + memberchk(X/

Categories : List

initializing members of a list
You're rebinding the name item to the length of the name item that was just bound by the loop. You cannot initialize a list in this way. All you're doing is rebinding a variable in each iteration. Your list comprehension is a perfectly acceptable method for initializing a list.

Categories : Python

limit users in group chat of whatsapp by an android app
You can use Yowsup which is a Python library. You will need to setup a separate WhatsApp account that logs into the WhatsApp servers using this library. This account will need to be the "owner" of the groups and will need to manage adding and removing users from the chat. The code will also need to monitor the chat traffic to figure out who is talking. The code you develop does not need to run all the time. You will need to register listeners for a number of WhatsApp events. Some of your init code will look like this: class WhatsappClient: def __init__(self): atexit.register(self.exitfunction) connectionManager = YowsupConnectionManager() connectionManager.setAutoPong(True) self.signalsInterface = connectionManager.getSignalsInterface() self.methodsInterface = conne

Categories : Java

PowerShell Send Popup Message to users in group
As far as I understand. You can execute the script on a remote computer, but the user will not see the popup. This is because the remote process is not allowed to interact with the user Desktop. PS : have a look to this answer I think that on XP you can use NET SEND in upper versions you have MSG.EXE or third party WinSent.

Categories : Powershell



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.