Now this is bad security (yet another Sony story)

Friday, July 22, 2011 | En Español

I'll take a little deviation from the usual posts just to share and leave this as a reminder of how not to implement security.

The captcha generating function at Sony doesn't generate an image, just some text and changes its style. I am sure that this script will not last long in there, but here, have some fun:

http://pro.sony.com/bbsc/jsp/forms/generateCaptcha.jsp 

They do "disable" the mouse, but you can see the source code from the menu, or pressing CTRL+U in about any browser, or CTRL+A (select all), CTRL+C (copy) CTRL+V (paste). Or, if you have a terminal with curl installed:

Read more...

Categories: Commands, Linux

Split and merge files from the command line

Saturday, June 18, 2011 | En Español

Although some file archivers offer us the option of split the files, this can be easily accomplished with two commands: split and cat.

Read more...

Categories: Commands, FOSS, Linux

xorg.conf configuration for a H770 series monitor

Saturday, May 21, 2011 | En Español

Just in case someone else need it (or in case I need it in the future). It is not a modern monitor, so it is not automatically configured.

Read more...

Categories: FOSS, Linux

Managing MySQL from the command line

Friday, March 18, 2011 | En Español

If our hosting service offer us a SSH shell and have MySQL installed, or if we have MySQL installed in our computer, we can administer a database from the Command Line Interface. If we develop programs that require the use of a MySQL database, most likely we are already familiarized with SQL statements. By the use of the mysql command we can send this queries to the database.

Read more...

Categories: Commands, FOSS, Linux, MySQL

Using rsync and cron to automate incremental backups

Tuesday, February 15, 2011 | En Español

Data loss is a serious concern to both individuals and companies that rely in the use of computers for their every day life or operations. Those who have a Unix based system count with powerful tools to prevent this, such as rsync to backup the information, and cron to make the backup process automated. In previous posts I wrote about the basics of rsync and it's usage as a daemon, as well as the basics of cron. In this post the focus is on the backup functionality of rsync, and its conjoint usage with cron to automate the backup process.

Read more...

Categories: Commands, FOSS, Linux, rsync, SSH

Configure unrecognized keys in Linux

Saturday, January 15, 2011 | En Español

Occasionally I am presented with keyboards that contain keys that are not recognized by default in Linux. In most cases the fix consist in select a different keyboard layout, modern Linux distributions cover a wide variety of keyboards, but some times there is no keyboard layout available that matches our keyboard and the functionality of some keys is lost. In this post I write about how to detect and map unrecognized keys. I am making the assumption that you are working in a graphical environment and that you want to give it some functionality to the key there.

Read more...

Categories: Commands, FOSS, Linux

Using cronjobs in Linux

Thursday, January 06, 2011 | En Español

cron is a daemon that allow us to schedule the launching of programs and scripts. This allow us to automate the execution of diverse tasks in our computer. cron is launched when we boot our computers and stays running in the background.

Read more...

Categories: Commands, FOSS, Linux

Running rsync as a daemon

Tuesday, January 04, 2011 | En Español

If the host computer is not running SSH (or RSH), we can configure and run rsync as a daemon in this computer. This would have rsync listening to the port 873 for incoming connections from other computers utilizing rsync. While this is not recommended for the transfer of files across unsecured networks, such as the Internet, because the actual data transfer is not encrypted, we can use this to keep information synchronized between different computers in internal networks, as well as perform backups.

Read more...

Categories: Commands, FOSS, Linux, rsync

Making better use of the Caps Lock key in Linux

Monday, November 15, 2010 | En Español

How frequently do we really use the Caps Lock key?, This is one of the best positioned keys in our keyboard, as it rests next to the A key, however, in this space we have this Caps Lock key that we seldom utilize. For those who type without looking at the keyboard it is an even more important space, as it is readily available with a minor movement of the left pinky. I am sure that there are people who do utilize it in a daily basis, but it is my understanding that this is a minority.

But this can be easily changed in Linux. And believe me, you wont regret this change once you grow accustomed to it. For a Vim user there is no question about what to do with this key, we can swap it for the Escape key, or turn it into a second Escape key, although I personally didn't want to lose the functionality so I just swapped it. Other possible uses are to turn it into another Backspace key, or into a Control key, we can even give it the functionality of a multimedia key.

Read more...

Categories: Commands, FOSS, KDE, Linux

Synchronizing folders with rsync

Tuesday, November 02, 2010 | En Español

In this post I cover the basics of rsync, in preparation for a subsequent post that will cover backups and it's use in conjunction with cronjobs to automatize the backup process. From the copying and synchronization of local files and folders, to it's use for transfer information among computers. Its use as a daemon when SSH is unavailable was moved to it's own section.

Read more...

Categories: Commands, FOSS, Linux, rsync

Installing Slackware in an encrypted LVM

Saturday, October 02, 2010 | En Español

Introduction

When a laptop is lost or stolen (or it may be a desktop computer, but this is more likely to happen with a computer that we carry around), at first we may resent the price of the machine itself (and the personal data on the machine if you do not back-up frequently, which you really should, specially if you move your computer around a lot), until we realize that whomever is in possession of the computer posses access to all of our information: our photos, our documents, our media, all of our browser history, and, to make things worst, he/she may have access to sensitive information such as our credit card and log in information of the websites that we visit. If this lost computer used to belong to a corporate user, things are even worst, as whoever took possession of the computer may have obtain sensitive information about the company or about the clients of the company.

Read more...

Categories: FOSS, Linux, Slackware

How to create a reverse SSH tunnel

Sunday, September 12, 2010 | En Español

Sometimes that we need to connect via SSH into another computer, we find out that this computer that we intend to SSH into (which we are going to call "destiny") may be utilizing NAT and therefore it doesn't count with a public IP address that we could use to connect to it, or it may be behind a firewall that won't allow access from the outside.

If "destiny" can successfully establish a SSH connection to another computer that is accessible, we can utilize this second computer to establish a reverse SSH tunnel to our "destiny" computer, we are going to call this second computer "origin" (even if it is not actually the computer that we are going to use to manage "target" remotely, but only a bridge).

Read more...

Categories: Commands, FOSS, Linux, SSH

Create a KTouch lecture from a list of words

Sunday, September 12, 2010 | En Español

Since I didn't find any lecture that I liked for KTouch, at least not one that allowed me to simply practice typing with a large number of random words, I thought it would be useful to create one based in random words taken from one of the lists of words usually located in /usr/share/dict, although this very same procedure can be use with any list of words. It didn't take to long to do it, but nevertheless it was interesting.

I include at the end the lecture that results from this procedure, as well as a lecture based in the words from the book The Adventures of Sherlock Holmes.

Read more...

Categories: Commands, FOSS, KDE, Linux, Text manipulation

Detecting and changing the encoding of text files.

Tuesday, August 24, 2010 | En Español

When you receive and need to handle multiple text files that use characters that are not natural to the English language, you may run into the problem that is dealing with different character encodings. This is particularly noticeable in websites, where if the browser try to interpret the text file with an encoding that differs from the actual encoding that the file is using, we can see strange symbols where this characters were supposed to show, but it is not limited to websites, any program that is made to work with languages other than English may present a similar problem if it is not appropriately handled.

Read more...

Categories: Commands, FOSS, Linux

Defining SSH servers

Sunday, August 22, 2010 | En Español

If we need to log in often to the same SSH server(s), instead of type the entire connection command every time that we do it, since a connection command that may go something like this:

ssh -p 34567 username@subdomain.domain.tld

We can create a SSH configuration file that would allow us to define the parameters of a server, and then start a connection to it by simply typing the name that we gave it.

Read more...

Categories: Commands, FOSS, Linux, SSH

Passwordless SSH using digital signatures

Sunday, August 22, 2010 | En Español

When we log in via SSH to a server, a way to authenticate with it that does not require the use of a password is the use of digital signatures. What we do in this case is to generate a key pair (a public key and a private key), and then add our public key to the list of authorized keys in the server that we want to be able to log into.

Read more...

Categories: Commands, FOSS, Linux, SSH