//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1.16");//Connect to ldap server $srn1 = ldap_search($dsn1,"ou=People,dc=bawo,dc=cn","(cn=*)");//Query ou= People, dc=bawo, dc=cn, the result of cn, return to srn1 $infon1 = ldap_get_entries($dsn1, $srn1); //get the number of entries in srn1, save in infon1 array for ($ i = 1; $i < $infon1["count"]; $i++)//Start the loop to join the ITDB database //for ($i = 0; $i < 3; $i++)//this It is used for testing. Only the first three users of 0, 1, and 2 are added to the system, which is beneficial to delete { $usrn1=trim(strtolower($infon1[$i]["cn"][0])); /username becomes lowercase, then interrupt $u=0; $u=getuserbyname($usrn1);//getuserbuname is used to check if the username exists in the ITDB database, if it does not exist, Returns -1, or $u if it exists. If ($u==-1){ $rnd=mt_rand(); //createa random db_execute2($dbh, "IN SERT into users (username,cookie1,usertype) values (:username,:cookie1,:usertype) ", array('username'=>$usrn1,'cookie1'=>$rnd,'usertype'=>2));//This usertype is to create the permissions granted by the user db_exec($dbh," ;UPDATE users set cookie1='$rnd' where username='$usrn1'",1,1); } }////////////////////////////////////////////////////////////////////>
The meaning of this code is that Just open the ITDB page, it will update the u=People, dc=bawo, dc=cn user in the LDAP to the ITDB database. It will be updated regardless of the success or failure of the login.
Under ubuntu bower reported EACCES: permissiondenied solution, used ower express to use bow
Through the network port bonding (bond) technology, network port redundancy and load balancing can b
Use yum to install the scheduled task function. The result is prompted:
Copy the code
The code is as follows:
# yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-pa
Grep yum root 6744 0.0 0.0 103260 900 pts/1 S+ 14:59 0:00 grep yum root 25960 0.0 0.0 0 0 ? Z Sep19
I have used the inux system to forget the root password. What should I do if I encounter suc
Centos6.5 x86 installation oracle 11g2r tutorial
Linux can ping IP, ping nowhere domain
Ubuntu suddenly does not go to the network how to do
Text line garbled problem under Linux
Linuxweb directory file full script
Real-time automatic backup of switch configuration files every day with Linux server
Linux system unzip decompression Chinese name garbled solution
Modify the linux command prompt line path length
The difference between the chown and chmod commands in Linux
Compression and decompression commands commonly used under Linux
Fun Win XP system restore function + skill diagram
Comprehensively improve the security performance of the FTP server
Those Windows systems run command big inventory
Any new system is just a catalyst for Microsoft Windows 7 and it is
When the Win7 system is backed up, the popup service fails to start. Error 0x80070422 What to do
What should I do if the win10 preview version does not open?
How to upgrade win10 preview version 14986 to version 15002?
Windows 10 Redstone Build 14306 will be the next Build