Update multiple tables from a column; MySQL

Update multiple tables from a column is something that does not happen very often. Personally I never had to do it. I came across this question from a friend. He is programming something, and he had the following situation:

field_data_body
+----------+---------------------+
| entry_id | body_value          |
+----------+---------------------+
|  1009    | content             |
+----------+---------------------+
|  1020    |                     |
+----------+---------------------+
|  1025    | more content        |
+----------+---------------------+


i_posts
+------+---------------+
|  id  |     html      |
+------+---------------+
| 1009 |               |
+------+---------------+
| 1020 |               | 
+------+---------------+
| 1025 |               | 
+------+---------------+

From this two tables he wanted to get i_posts updated with information from field_data_body’s body_value field. In other words write this:

  Continue reading

Synchronization GLPI LDAP or Active Directory

Synchronization GLPI LDAP. GLPI is a very popular ticket (call) system. It has a lot of features that make it competitive with any other ticketing or ICT management system. Some of the features that I have configured before are here.

LDAP Active Directory Connection.

One of the many powerful features of GLPI is the integration with many forms of LDAP. Among them Windows Active Directory (AD). To integrate it you just have to supply your AD server info on the form shown on this picture.

Synchronization LDAP Active Directory

LDAP AD config

If you receive any error about not finding any configuration. You might have the PHP LDAP module missing. So make sure the module is installed.

  1. Host LDAP is the address of the server (AD or Openldap) that glpi will use.
  2. Basedn is the field that identifies the DN (Distinguished Name) where the search is starting.
  3. rootdn (For non anonymous connections): this is for the user authorized to read the Directory (AD or Ldap for example: cn=Admin,ou=People,dc=mycompany make sure not to leave spaces between nodes. This is wrong: cn=Admin, ou=People , dc…)
  4. Pass (For non anonymous connections): User password.
  5. Connection filter: To restrict the search.

Continue reading

LDAP linux configuration and install from source

Hi, if you want to configure LDAP (OpenLDAP) properly and you have never done it, I advise you to read a lot of

LDAP tree

LDAP tree

nonsense out there that people write on blogs like mine, before actually trying. After reading a lot of that the you can try, and let me tell you a secret, the best documentation is the one that they provide on their own website, just that sometimes that one is a bit complex to understand.

Well fist the fist, my LDAP version 2.4 never worked installing from repositories on Debian 7. How unable am I or how silly… I don’t know. Bot it did not work as it use to do with earlier versions. I was unable to set the user, password, domain and those initial things using the installer package.deb and dpkg-reconfigure. So I decided immediately that if I am losing the power of having a repository because of this nonsense, then I do not need them any more. I am going to compile the package myself from source. I tried so… but I struggled with the ./configure options. I could not fins the proper ones. and this error report thread gave me the clue to be able to follow the LDAP manual.

After reading this manual I ended up with a file that contains this: Continue reading

Hits, visitors, challenges and achievements; Abel world

Visitors, my personal blog is more than one year now. During this time I managed to achieve a few things 🙂 and

Pic. 1 - Today's visits per country.

Pic. 1 – Today’s visits per country.

some others not so well. As an ICT professional this was my first adventure with having my own blog. I have been in the field for many years. Mainly doing other types of works. Like network administration, developing software and websites, etc. Never before I have started my own web. Never tried to maintain a my own web to make it succeed.

before starting to explain the results fist let me tell you the objectives of creating the web. When I created my blog I wanted to:

  1. Learn English by writing and being corrected by people.
  2. Create sort of a logbook of some of the work I do.

So far I have half won half lost. Let me put the list of failures first.

  1. My web is not a hit like Facebook. It would be good to have something like that and become a million-er. But it just did not happen. It was not one of my objectives and my subjects are not so general. I have not put enough time on this web. in general I did not manage.
  2. I still have a lot of English to learn, and I think I am a bit dyslectic. I am serious! I write things and I think they are fine. Then review a few times. Everything is perfect. Give it to someone to read and he finds that I made a lot of mistakes like forgetting about letters or changing them. Let say I write “in” when I wanted to write “is”. About the English improvement, if you read my fist posts you will see for your self. For instance check out this one.
  3. My website cost is payed from my own pocket, it does not pays it self yet. But soon it will.
  4. I have not been able to really put all the time I wanted in to the site.

The good things:
Continue reading

Network segmentation for business

Network segmentation was created to help dividing network from each other. Wikipedia defines it as: “Network

Network Segmentetion

Network Segmentetion

segmentation in computer networking is the act or profession of splitting a computer network into sub-networks, each being a network segment or network layer. Advantages of such splitting are primarily for boosting performance and improving security.”

The applications of this are infinite in now a days business world. Let me just explain a little about my customer particular case.

I decided to write this Network segmentation post due to our last client. He is a hotel owner. The hotel has a lot of rooms. They had a network of a few staff computers plus all the customers computers. The customers access the network using WiFi. Just to serve as an example the customers were on the same network as the accounting computer. That is not a good idea. For instance the day that I was deploying the server at the hotel. I had to cut the network for a few minutes. A customer came to complain and guess what. He was an IT guy. He came saying to me things like the IP address from today is different from the one I had yesterday. I did an NSLOOKUP and it says bla,bla,bla. This guy turned to be a really nice guy, but not everyone has a good heart and intentions.

So because of an incident the owner called me to find a solution. He wanted a few more things. Here is part of a presentation we did for him. Continue reading

GLPI ticket system & Inventory solution a very viable solution

GLPI TEAM solution

Team work organization solutions with GLPI

Have a problem to organize team work? have problem to document and follow performance? You do not have satisfactory the statistics about the work done! Have you ever had problems to find simple reports like who is the best worker of the month? Have problems planning resources for the department? Do not know how many computers and other equipment are in the network?

You can use GLPI to solve all those problems. I have a few years of experience maintaining these type of servers for different environment and customer needs. lso I decided to write this post and share some of the things that you can get with GLPI. The main features of GLPI are:

 

  • Inventory of computers, peripherals, network printers and associated components through an interface with OCS Inventory or FusionInventory.
  • Management of issues on many environments through creation of tickets, management of tickets, assignment, tickets scheduling, etc.
  • Licenses management (ITIL compliant)
  • Assignment of equipment by geographical area to users and groups
  • Management of business and financial information (purchase, guarantee and extension, damping)
  • Equipment status management
  • Management of applications for assistance of all types of equipment inventory
  • Interface to allow the user to file a support ticket
  • Business management, contracts, documents related to inventory items
  • Equipment booking
  • Management of a Frequently-Asked Questions (FAQ).
  • Report generator: hardware, network or interventions (support).
  • Multilingual support with 45 languages available.

Continue reading

Git client configuration for a local server.

Gitlab Logo

Gitlab Logo

Configuring a git client can be painful sometimes if you are a beginner. I struggled the first time I configured git too. So I am creating this material for others like me to be able to configure git. I hope it works for you. Git is now a days one of the most popular versioning systems. I use git since a few months ago to keep my Symfony 2 projects update.

Configure gitclient with you User name:

git config --global user.name "Abel Guzman"

Continue reading