In PHP, you may get this warning (Warning: ldap_search(): Partial search results returned: Sizelimit exceeded in) when more than 1000 objects returned in single search, you can change using following guide:
- Open Command Prompt on a domain controller (You must use admin credentials)
- Type NTDSUTIL and press ENTER.
- In the ntdsutil: prompt, type ldap policies
- In the ldap policy: prompt, type connections
- In the server connections: prompt, type connect to server <FQDN of domain controller> (example: connect to server domain1.com)
- Once you are connected, type q to come back to the ldap policy: prompt.
- To change the value to allow up to 5,000 objects to be returned in a single LDAP query, type set MaxPageSize to 5000
- To commit changes type commit changes
- If you type show values, you can see the current value for the administration limits, including the MaxPageSize limit
This is because of buggy questions imported by file import.
1- Run below query and then save the result in text file
SELECT t1.id, t1.name
FROM mdl_question t1
LEFT JOIN mdl_qtype_multichoice_options t2 ON t1.id = t2.questionid
WHERE t1.qtype=’multichoice’ AND t2.id IS NULL
2- Then run another query to delete buggy questions by ID
Delete from mdl_question where id in (id1, id2, ….)
In CentOS7 I faced strange issue when I added VirtualHost, the default host was disabled, I solved according to below Guide:
This installation of MySQL is already upgraded to 5.7.29, use –force if you still need to run mysql_upgrade E: dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem.
The solution is:
1- Open this file for edit:
2- At line # 370, comment the echo ALTER statement which would like
#echo “ALTER USER ‘root’@’localhost’ IDENTIFIED WITH ‘auth_socket’;” >> “$initfile”
(just add # to the beginning of this line to convert it to comment)
3- Save above file and start updating it will be fine
Run below script to enable inheritance for Bulk AD user under specific OU (enable inheritance on all AD user accounts)
$ADusers = Get-ADUser -ldapfilter "(objectclass=user)" -searchbase "OU=Students,DC=ukh,DC=edu,DC=krd"
ForEach($user in $ADusers)
# Binding the users to DS
$ou = [ADSI]("LDAP://" + $user)
$sec = $ou.psbase.objectSecurity
$isProtected = $false ## allows inheritance
$preserveInheritance = $true ## preserver inhreited rules
Write-Host "$user is now inherting permissions";
Write-Host "$User Inheritable Permission already set"
attrib -s -h "full path of folder\*" /s /d
First run command prompt as Administrator then paste above code (Replace
full path of folder with realpath of the folder for example: c:\folder1\)
Same as above only change -h with +h
attrib -s +h "full path of folder\*" /s /d
You need to configure two attributes:
1- msExchEnableModeration set to True
2- msExchModeratedByLink add CN of people who can approve messages