20111130

Con la guardia baja

Lo reconozco. No todos los días está uno con la guardia bien alta, y cuando por despiste o cansancio la bajas un poco, toma hostiazo!!!
Resulta que el día de hoy no es que haya sido especialmente duro, pero sí que acumulo demasiada mierda en la cabeza por lo profesional y también en lo personal y eso, pues no ayuda a estar lo lúcido que hace falta para afrontar las tonterías diarias de los $lusers.
Venía yo de otra sede cuando sólo restaba algo menos de una hora para terminar la jornada, y venía con esas prisas y ese sudorcillo propios de tener más lío que tiempo para desliarme. Caminaba derecho hacia la syscave,  cueva en la que normalmente me refugio de los $lusers, cuando al pasar por el despacho de Mr. Om oigo algo que me pone en alerta.
Mr. Om es alto, delgaucho y dergabao. Tiene un andar tranquilote, con pasos laargos y arrastra los talones con cada zancada. Pinta las pocas canas caracoleadas que le asoman entre sesión y sesión de JustForMen, todas ellas y los demás también peinados hacia atrás con más grasilla que gomina. Se apoya sobre la mesa con los antebrazos cruzados de forma que aunque usa el ratón con la diestra, lo tiene colocado más bien a la siniestra. Si preguntas por él a los demás $lusers no creo que muchos sepan decirte a qué se dedica y pocos que no sepan decirte a que no. Yo lo clasifico dentro del grupo de los indios, debido entre otras cosas a que pasa la mayor parte del tiempo echando humo, sentado contemplando la pantalla del PC como si estuviese ante la tele de los Poltergeist y estuviese viendo algo más allá, o con el resto de vacas sagradas haciendo piña en el bar.
A la puerta de su despacho estaba la Sra. Potato, sujetando el saco que mal esconde su fealdad con una basta cuerda de esas que llevan los monjes de clausura. Es curioso porque a pesar de tener pinta de ser un juguete de plastilina maltratado por un niño cabroncete, es un cuervo, negro y oscuro en todo lo que hace, dice y piensa.
No me ve llegar y justo cuando paso junto a ella la oigo graznar:
- Qué coño! Cómo los desgraciaos estos no nos dejan instalar programas aquí no hay quién trabaje.

Vaya argumento de mierda. Me ve justo cuando termina el graznido y se aleja mientras mueve las piernas y la grasa que se adivina bajo el saco, como bailando al son de músicas distintas.
Al su vez, Mr. Om sale de su hechizo televisivo y me espeta un:
- Oye, échame una mano con esto.
- Tranquilo majo, que suelto el petate en la syscave y vengo enseguida.

Miro la pantalla del teléfono y sólo tengo 3 llamadas perdidas, tampoco es tanto! Vuelvo y comienza el show:
- Dime, qué pasa?
- Que quiero abrir esto que me ha enviado correos y no me deja.
- A ver, ¿qué es lo que quieres abrir?

Mientras señala la única ventana que flota sobre el escritorio de su Microsoft Windows XP con varios cores, me muestra lo holgazán y a su vez zoquete que es haciendo clic repetidamente sobre uno de los archivos que muestra 7zip todavía sin descomprimir, uno con el icono de Adobe PDF.
- ¿Qué narices es eso?
- Es de la empresa de mensajería, y lo tengo que abrir.
- A ver, déjame un momento. 

Descomprimo el paquete en una carpeta sobre el escritorio, y le digo que pruebe de nuevo, sobre lo que supongo es un nuevo programa para generar etiquetas postales o algo así. Se encorva de nuevo, y comienza el ritual, cruce de manos, ojillos hipnóticos, y clic, clic, clic.
- Nada, lo ves?
- Venga, levanta y déjame que tengo mucho lío y poco tiempo que perder.

Me siento y sin pensar voy a lo fácil.
Inicio -> Ejecutar -> cmd y pulso intro.
runas /user:administrador cmd.exe
cd c:/Documents and Settings/mrom/Desktop/mesajeria/
etiqueta.exe

Nada, ni sensación. El cursor muestra el reloj de arena, la flecha y el cursor de arena de nuevo tras unos instantes.
- ¿No tiene esto instrucciones? ¿Donde están?
- No, venía sin instrucciones.
- Ya, y quién te lo ha traído?
- Me lo han enviado por email.
- A ver que lo vea.

Me lo enseña y se me queda la misma cara de lerdo que a él, y no es debido a un contagio por proximidad. Tras leer el contenido del email veo claramente lo sucedido. Miro el remitente pero no me cuadra, CRTL+U para ver el mensaje sin formatear y ahora está claro al 110%.
- ¿Pero tú esperabas este email?
- No, bueno sí, aunque no sé si ese. He pedido un paquete y como me ha llegado ese email, y ponía que no había nadie en la dirección de recogida pues quería imprimir el recibo, aunque me lo envían aquí a la oficina.
- Y claro, eso no te ha parecido raro, porque como no os aviso de estas cosas.

Y me callo por no escupirle a la cara cuatro verdades, para centrarme en lo que estoy, y porque se la han metido a él, y en parte también a mi como administrador, ni más ni menos.
Abro el navegador y apunto a www.virustotal.com, subo el archivo, y el aviso de que ese MD5 ya está en su base de datos, me avisa de lo que ya sabía. Virus!!! según más de la mitad de los motores lo detectan como tal, y por supuesto, y como el puto Murphy me ronda últimamente, nuestro antivirus corporativo no es uno de ellos. Y la muy cerda gruñendo porque no pueden instalar programas!!!
- Ala! Cagada del 12!!
- Apaga el ordeñador y me lo llevas al taller. 
- ¿Qué pasa?
- Que no hacéis ni puto caso a lo que os digo coño!! Y que te quedas sin PC hasta nuevo aviso. Mañana si tengo tiempo lo intento limpiar o te pongo otro y empezamos con este from scratch.

Lo reconozco, culpa mía, de poco valen las excusas, me han pillado con la guardia baja, y zas!!! en toda la boca!!!

Ahi alguien ahí?

20111129

Thunderbird: autoguardar adjuntos - Thunderbird: autosave attachments

Hoy, y después de que unos días atrás introdujese a un $luser en el mundillo de los filtros del cliente de email Mozilla Thunderbird, me ha preguntado si era posible guardar los adjuntos de los correos recibidos cuyo remitente fuese uno en concreto.
La verdad es que no tenía ni idea (y menos mal, que si lo supiese todo igual o era insoportable, o iba por ahí soltando babas y con un embudo en la cabeza), así que me he tirado (no literalmente) a Google y he encontrado la extensión o complemento AttachmentExtractor que, como su nombre indica, pues extrae adjuntos!
Entre las opciones que nos ofrece se encuentran:
  • extraer todos los adjuntos de los mensajes seleccionados
  • autoguardar en una carpeta ya seleccionada, los adjuntos de los mensajes después de recibirlos

La cosa es que este $luser en cuestión necesitaba hacer esto sólo con los mensajes enviados por un remitente en concreto. Pues bien, la extensión nos permite autoguardar los adjuntos de los mensejes con una etiqueta determinada, así que lo que he hecho ha sido lo siguiente:
  1. crear la etiqueta Extrated
  2. crear un filtro para para que etiquete y mueva a una carpeta de la bandeja de entrada los mensajes del remitente en cuestión
  3. configurar AttachmentExtractor para que autoguarde después de recibir, los adjuntos de los email etiquetados como Extracted. Esto se configura en las opciones de la extensión -> Extraer automáticamente y he marcado:

Y a funcionar. A que mola?

Today a $luser, after introduce him into the Mozilla Thunderbird tags' world, asked my about the posibility of autosaving the attachments of the incoming emails. After few seconds wearing my best poker face, I was searching the web looking for the answFew seconds wearing my best poker face, I was searching the web looking for the answer! An it name is AttachmentExtractor, an extension that allows you to autosave the attachment of a group of selected emails.er! An its name is AttachmentExtractor, an extension that allows you to autosave the attachment of a group of selected emails, and more. But $lusers are $lusers and the more you work the less they do! And he needed to autosave just some of the new incoming emails so I have to use my fly's brain and configure his mail client to do the following:
to create the tag Extracted
to configure a filter to mark the dessired email with this label
to configure AttachmentExtractor to autosave the attachments of the incoming emails marked as Extracted (look at the picture above)

And ta-dah!!!

PS. Is there anybody out there? Help me with my English and correct my mistakes! Thanks a lot.

20111125

Scripting: copiando datos a la red - Scripting: backup your data to the network

Tengo dicho una y mil veces a los $lusers de mi organización, que guarden en la red aquellos emails que puedan echar de menos en caso de pérdida. Sí, lo śe, pero me niego a hacer backup de toda la basura que envían y reciben. No somos Google ni mucho menos, así que ¿para que hacer copia de tal cantidad de mie_da?
La cosa es que pedirles que hagan copia de sus favoritos y su libreta de direcciones quizás sea demasiado, así que, teniendo en cuenta que principalmente usan Internet Explorer y Mozilla Firefox para guarri-navegar por la red de redes, y Mozilla Thunderbird como cliente de correo corporativo, he añadido el siguiente script al de logon de Active Directory, con el que copio los archivos a su unidad de usuario de red:
@ECHO OFF
SET BACKUP_DIR=u:\backup
REM Creación de directorios
IF NOT EXIST %BACKUP_DIR% MKDIR %BACKUP_DIR%
IF NOT EXIST %BACKUP_DIR%\ie mkdir %BACKUP_DIR%\ie
IF NOT EXIST %BACKUP_DIR%\ffox mkdir %BACKUP_DIR%\ffox
IF NOT EXIST %BACKUP_DIR%\tbird mkdir %BACKUP_DIR%\tbird
ATTRIB +H %BACKUP_DIR%

REM Backup favoritos de IE
xcopy /q /e /y "%USERPROFILE%\Favoritos" %BACKUP_DIR%\ie\ > NUL
REM Backup marcadores de Firefox
FOR /f "tokens=1 delims=(=" %%G IN ('dir /s/b/a  "%APPDATA%\Mozilla\*.sqlite"') DO copy /y "%%G" %BACKUP_DIR%\ffox > NUL
REM Backup libretas de direcciones de Thunderbird
FOR /f "tokens=1 delims=(=" %%G IN ('dir /s/b/a  "%APPDATA%\*.mab"') DO copy "%%G" %BACKUP_DIR%\tbird > NUL

Por si a alguno le sirviese de ayuda!


"Our SAN will never store the rubbish you store in your mail boxes". I've said that once and again to the $lusers of my organization. If once a year the recieve an important mail they have to save it on the network where the backup proccess will protect them from themselves, but to asking them to save their bookmarks and addressbooks is too much! 
Internet Explorer y Mozilla Firefox are the clients the use to browse the web and Mozilla Thunderbird is the mail client we use so I've added the folloging lines to the Active Directory logon script:
@ECHO OFF
SET BACKUP_DIR=u:\backup
REM Making the backup directories
IF NOT EXIST %BACKUP_DIR% MKDIR %BACKUP_DIR%
IF NOT EXIST %BACKUP_DIR%\ie mkdir %BACKUP_DIR%\ie
IF NOT EXIST %BACKUP_DIR%\ffox mkdir %BACKUP_DIR%\ffox
IF NOT EXIST %BACKUP_DIR%\tbird mkdir %BACKUP_DIR%\tbird
ATTRIB +H %BACKUP_DIR%

REM Backup IE favorites
xcopy /q /e /y "%USERPROFILE%\Favorites" %BACKUP_DIR%\ie\ > NUL
REM Backup Firefox bookmarks
FOR /f "tokens=1 delims=(=" %%G IN ('dir /s/b/a  "%APPDATA%\Mozilla\*.sqlite"') DO copy /y "%%G" %BACKUP_DIR%\ffox > NUL
REM Backup Thunderbird addressbook
FOR /f "tokens=1 delims=(=" %%G IN ('dir /s/b/a  "%APPDATA%\*.mab"') DO copy "%%G" %BACKUP_DIR%\tbird > NUL

I hope it helps you!

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111121

Kate en modo VI - Using Kate as VI

Ave geeks!
Si eres uno de esos a los que alguna vez se le ha colado un :wq utilizando el editor de textos de KDE Kate estás de suerte, porque aunque no hay cura para los vi-maníacos, podemos configurar Kate para que se comporte de forma similar a VI.
Para ello sólo tenemos que a Preferencias -> Configurar Kate -> Edición y en la pestaña Modo de entrada de VI encontramos lo que buscábamos.
Disfrutadlo con mesura que engancha!

Hi geeks!
I you are one of those who write :wq at least once a week using the Kate, the KDE text editor, this post is for you. There's no cure for that, or not jet, but you can customize Kate to work as VI.
Go to Settings -> Configure Kate -> Editting -> VI input mode
There you'll find everything you were looking for.
Enjoy it!

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111119

Forzar chequeo de disco al reiniciar - Force check disk on next boot

Estos días he querido realizar un chequeo de los discos de un servidor GNU/Linux con particiones ext4, principalmente porque lo he pasado de físico a virtual y quería comprobar la integridad de estos.
Para hacerlo he utilizado la herramienta tune2fs que permite ajustar determinados parámetros de los sistemas de archivos ext2/ext3/ext4.
Normalmente el chequeo de discos se produce por los siguientes motivos:
 - se detecta algún problema y se chequea para eliminar inconsistencias
 - se ha alcanzado el tiempo máximo entre chequeo y chequeo (Check interval)
 - se ha alcanzado el número máximo de montajes (Maximun mount count)

Para ver estos parámetros introducimos lo siguiente en la consola, siendo /dev/sda1 nuestro fylesystem:
bdispatcher@server:~$ sudo tune2fs -l /dev/sda1

Lo que nos devuelve la información del sistema de archivos /dev/sda1 y que entre otras cosas contiene:
tune2fs 1.41.11 (14-Mar-2010)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          3c30b294-a5f9-43d5-a679-ec12fee8f013
Filesystem magic number:  0xEF53
Default mount options:    (none)
Filesystem state:         clean
Filesystem OS type:       Linux
Mount count:              8
Maximum mount count:      34
Last checked:             Sat Oct 29 12:44:27 2011
Check interval:           15552000 (6 months)
Next check after:         Thu Apr 26 12:44:27 2012

Así que para forzar el chequeo en el próximo reinicio podemos cambiar cualquiera de esas condiciones. En este caso, cambiaremos el número de veces que se ha montado el filesystem:
bdispatcher@server:~$ sudo tune2fs -C 35 /dev/sda1
tune2fs 1.41.11 (14-Mar-2010)
Se pone la cuenta de montajes actual a 35
bdispatcher@server:~$ sudo tune2fs -l /dev/sda1 | grep -i mount
Last mounted on:          /
Default mount options:    (none)
Last mount time:          Sat Nov 19 15:48:33 2011
Mount count:              35
Maximum mount count:      34

Si queremos chequear todos los fylesystems, podemos optar por lo siguiente:
bdispatcher@server:~$ sudo touch /forcefsck

Con esto conseguiremos que en el próximo inicio se haga un chequeo completo de todos los fylesystems. El fichero forcefsck se borrará cuando termine el chequeo.

Agur!


Last week I wanted to check the filesystems of GNU/Linux box with ext4 partitions,  because I've migrated it from phisical to virtual (P2V).
To do that I used the tune2fs command which allows you to adjust tunable parameters on ext2/ext3/ext4 fylesystems.
Normally a fylesystem check occurs for the following reasons:
 - some inconsistency detected
 - the check interval has expired (Check interval)
 - the max mount count has been reached (Maximun mount count)

To show these parameter of the /dev/sda1 fylesystem, let's enter the following on a console:
bdispatcher@server:~$ sudo tune2fs -l /dev/sda1

And this is a brief summary of the info we get:
tune2fs 1.41.11 (14-Mar-2010)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          3c30b294-a5f9-43d5-a679-ec12fee8f013
Filesystem magic number:  0xEF53
Default mount options:    (none)
Filesystem state:         clean
Filesystem OS type:       Linux
Mount count:              8
Maximum mount count:      34
Last checked:             Sat Oct 29 12:44:27 2011
Check interval:           15552000 (6 months)
Next check after:         Thu Apr 26 12:44:27 2012

So to force the filesystem chek on next boot we could change one o those conditions. In this case we'll change the Mount count value:
bdispatcher@server:~$ sudo tune2fs -C 35 /dev/sda1
tune2fs 1.41.11 (14-Mar-2010)
Setting mount count to 35
bdispatcher@server:~$ sudo tune2fs -l /dev/sda1 | grep -i mount
Last mounted on:          /
Default mount options:    (none)
Last mount time:          Sat Nov 19 15:48:33 2011
Mount count:              35
Maximum mount count:      34

We can also force a full filesystem check just 'touching' the following file:
bdispatcher@server:~$ sudo touch /forcefsck

After entering this command will get a full fylesystem check on the next boot. The  forcefsck file will be deleted on the next boot.

Ciao!

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111105

Modo VI en la línea de comandos - VI mode on the command line

Desde los primeros días de mi primer trabajo en el que tuve que enfrentarme con la consola de equipos GNU/Linux me acostumbré, por consejo de un ex-jefe y amigo, a utilizarla en modo de comandos vi.
Para conseguir esto, basta con introducir lo siguiente:
set -o vi

A partir de ese momento, la consola funciona como el editor vi, así tienes un modo de inserción y un modo de ejecución de comandos. Desde este, por ejemplo, puedes realizar búsquedas en tu historial de comandos, como si buscases dentro de un documento de texto con vi.
Para volver al modo habitual, introduce lo siguiente:
set -o emacs

Por defecto los sistemas suelen venir en modo emacs, por lo que si como yo, prefieres el modo vi, puedes hacer que sea el predeterminado añadiendo la siguiente entrada al fichero /etc/inputrc:
set editting-mode vi

A disfrutarlo (o sufrirlo según el caso ;P)

Since first days I start working with GNU/Linux I got used to type and work with the vi mode enabled on the command line. To achieve this, just type the following:
set -o vi

Once you have change into the vi mode, the command line works as the vi editor, so it has the insert and the commands modes to work with. So if you, for instance, wants to search for a recently typed command, you can look for it on the same way you'll do on the vi editor.
To return to the previos configuration, just type:
set -o emacs

By default, the systems use to be configured on the emacs mode, but if you like the vi mode, you can do it the the default mode just adding to the /etc/inputrc the following line:
set editting-mode vi

Enjoy it (or suffer with it ;P)

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111102

Yum GLib-CRITICAL error

Uno de estos días, intentando instalar un paquete en uno de los equipos CentOS (en este caso era un CentOS 4.2 bastante antiguo) que tengo, me he encontrado con el siguiente problema:
[root@server usuarios]# yum search package
Searching Packages:
Setting up repositories
Reading repository metadata in from local files
(process:21149): GLib-CRITICAL **: file gtimer.c: line 106 (g_timer_stop): assertion `timer != NULL' failed
(process:21149): GLib-CRITICAL **: file gtimer.c: line 88 (g_timer_destroy): assertion `timer != NULL' failed
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 97, in main
    result, resultmsgs = do()
  File "/usr/share/yum-cli/cli.py", line 596, in doCommands
    return self.search()
  File "/usr/share/yum-cli/cli.py", line 1216, in search
    matching = self.searchPackages(searchlist, args, callback=self.matchcallback)
  File "__init__.py", line 1061, in searchPackages
  File "/usr/share/yum-cli/cli.py", line 75, in doRepoSetup
    self.doSackSetup(thisrepo=thisrepo)
  File "__init__.py", line 260, in doSackSetup
  File "repos.py", line 277, in populateSack
  File "/usr/lib64/python2.3/site-packages/sqlitecachec.py", line 40, in getPrimary
    self.repoid))
TypeError: Can not create index on requires table: near "NOT": syntax error

Para resolverlo lo que hice fue reinstalar el paquete yum. Antes de eso lo busqué dentro de la caché de yum en ese equipo y ahí estaba. Si no hubiese sido así, habría tenido que tirar de los mirrors de CentOS:
[root@server py]# cd  /var/cache/yum/
[root@server yum]# find . -iname "*yum*"
./update/packages/centos-yumconf-4-4.5.noarch.rpm
./update/packages/yum-2.4.2-2.centos4.noarch.rpm
./update/headers/centos-yumconf-4-4.5.noarch.hdr
./update/headers/yum-2.4.2-2.centos4.noarch.hdr
./base/packages/yum-2.4.3-3.el4.centos.noarch.rpm
./base/packages/yum-2.4.3-4.el4.centos.noarch.rpm
./base/packages/yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm
./base/headers/yum-metadata-parser-1.0-8.el4.centos.x86_64.hdr
./base/headers/yum-2.4.3-4.el4.centos.noarch.hdr
./base/headers/yum-2.4.3-3.el4.centos.noarch.hdr

Y ahora sólo resta reinstalar:
[root@server yum]# rpm -Uvh ./base/packages/yum-2.4.3-4.el4.centos.noarch.rpm

Y a funcionar:
[root@server yum]# yum search fdupes
Searching Packages:
Setting up repositories
Reading repository metadata in from local files
update    : ################################################## 1760/1760
Added 1760 new packages, deleted 0 old in 12.75 seconds
primary.xml.gz            100% |=========================| 715 kB    00:10    
base      : ################################################## 1844/1844
Added 781 new packages, deleted 725 old in 9.52 seconds
primary.xml.gz            100% |=========================|  192 B    00:00    
Added 0 new packages, deleted 0 old in 0.05 seconds
primary.xml.gz            100% |=========================|  42 kB    00:00    
extras    : ################################################## 149/149
Added 59 new packages, deleted 58 old in 0.45 seconds
No Matches found


Few day ago, I was trying to install a new package on one of my CentOS box (and old CentOS 4.2 server) when I got the following message::
[root@server usuarios]# yum search package
Searching Packages:
Setting up repositories
Reading repository metadata in from local files
(process:21149): GLib-CRITICAL **: file gtimer.c: line 106 (g_timer_stop): assertion `timer != NULL' failed
(process:21149): GLib-CRITICAL **: file gtimer.c: line 88 (g_timer_destroy): assertion `timer != NULL' failed
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 97, in main
    result, resultmsgs = do()
  File "/usr/share/yum-cli/cli.py", line 596, in doCommands
    return self.search()
  File "/usr/share/yum-cli/cli.py", line 1216, in search
    matching = self.searchPackages(searchlist, args, callback=self.matchcallback)
  File "__init__.py", line 1061, in searchPackages
  File "/usr/share/yum-cli/cli.py", line 75, in doRepoSetup
    self.doSackSetup(thisrepo=thisrepo)
  File "__init__.py", line 260, in doSackSetup
  File "repos.py", line 277, in populateSack
  File "/usr/lib64/python2.3/site-packages/sqlitecachec.py", line 40, in getPrimary
    self.repoid))
TypeError: Can not create index on requires table: near "NOT": syntax error

To solve this issue I reinstalled the yum package. I looked for it on the yum cache and there it was, but if not, I could download it from one of the CentOS mirrors:
[root@server py]# cd  /var/cache/yum/
[root@server yum]# find . -iname "*yum*"
./update/packages/centos-yumconf-4-4.5.noarch.rpm
./update/packages/yum-2.4.2-2.centos4.noarch.rpm
./update/headers/centos-yumconf-4-4.5.noarch.hdr
./update/headers/yum-2.4.2-2.centos4.noarch.hdr
./base/packages/yum-2.4.3-3.el4.centos.noarch.rpm
./base/packages/yum-2.4.3-4.el4.centos.noarch.rpm
./base/packages/yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm
./base/headers/yum-metadata-parser-1.0-8.el4.centos.x86_64.hdr
./base/headers/yum-2.4.3-4.el4.centos.noarch.hdr
./base/headers/yum-2.4.3-3.el4.centos.noarch.hdr

So lets reinstall it:
[root@server yum]# rpm -Uvh ./base/packages/yum-2.4.3-4.el4.centos.noarch.rpm

And now it works:
[root@server yum]# yum search fdupes
Searching Packages:
Setting up repositories
Reading repository metadata in from local files
update    : ################################################## 1760/1760
Added 1760 new packages, deleted 0 old in 12.75 seconds
primary.xml.gz            100% |=========================| 715 kB    00:10    
base      : ################################################## 1844/1844
Added 781 new packages, deleted 725 old in 9.52 seconds
primary.xml.gz            100% |=========================|  192 B    00:00    
Added 0 new packages, deleted 0 old in 0.05 seconds
primary.xml.gz            100% |=========================|  42 kB    00:00    
extras    : ################################################## 149/149
Added 59 new packages, deleted 58 old in 0.45 seconds
No Matches found

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111020

fdupes: Buscar ficheros duplicados - fdupes: Find duplicate files

Seguro que a muchos de vosotros se os ha presentado la situación de tener que buscar duplicados en vuestros sistemas GNU/Linux, ya sea en local o en red.
Buscando por la red puedes encontrar utilidades ya sea para la línea de comandos o con GUI. La cosa es que yo suelo utilizar fdupes.
Esta utilidad nos permite buscar y, si los encuentra, borrar los ficheros duplicados en nuestros discos.
Instalar esta utilidad en (K)Ubuntu es tan sencillo como:
sudo apt-get install fdupes

Una vez instalado sólo debemos ejecutarlo sobre la unidad que queramos y esperar el resultado.
bdispatcher@laptop:~$ sudo fdupes -r /home/bdispatcher/docs/web/
/home/bdispatcher/docs/web/backup/diptico_trip.FH11
/home/bdispatcher/docs/web/diptico_trip.FH11

/home/bdispatcher/docs/web/backup/fonfo1.jpg
/home/bdispatcher/docs/web/fonfo1.jpg

/home/bdispatcher/docs/web/backup/NORMAL
/home/bdispatcher/docs/web/NORMAL

/home/bdispatcher/docs/web/backup/Gothic.TTF
/home/bdispatcher/docs/web/Gothic.TTF

Cómo muchos de vosotros supondréis, fdupes hace uso del MD5 de los ficheros para ver si se encuentran duplicados o no.
Para más info sobre el uso de este comando, you know, man.

Probably most of you have wondered yourselves about the amount of disk wasted becouse of duplicate files on your GNU/Linux systems.
You could find some utils searching the web, but I'll reccomend you fdupes which would allow you to search and delete, if exists, the duplicate files on your filesystem.
To install this utility on your K(Ubuntu) system you only have to type is:
sudo apt-get install fdupes

Once installed, you just have to run it and wait for the result:
bdispatcher@laptop:~$ sudo fdupes -r /home/bdispatcher/docs/web/
/home/bdispatcher/docs/web/backup/diptico_trip.FH11
/home/bdispatcher/docs/web/diptico_trip.FH11

/home/bdispatcher/docs/web/backup/fonfo1.jpg
/home/bdispatcher/docs/web/fonfo1.jpg

/home/bdispatcher/docs/web/backup/NORMAL
/home/bdispatcher/docs/web/NORMAL

/home/bdispatcher/docs/web/backup/Gothic.TTF
/home/bdispatcher/docs/web/Gothic.TTF

As you could guess fdupes use MD5 to find out if two files are the same.
To get more info about this command, you know, man. 

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111018

CISCO ASA conceder acceso ASDM - CISCO ASA grant ASDM access

Estos días he tenido que configurar los Cisco ASA para permitir el acceso ASDM. El acceso se lo tengo que dar a la dirección ip 192.168.10.200 desde la interfaz SISTEMAS.
Para esto me he conectado por ssh (acceso que ya tenía y he entrado lo siguiente:
bdispatcher@laptop:~$ ssh admin@asa
admin@asa's password:
Type help or '?' for a list of available commands.
asa> enable
Password: *********
asa# conf t
asa(config)# http 192.168.10.200 255.255.255.255 SISTEMAS
asa(config)# wr
Building configuration...
Cryptochecksum: xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
89743 bytes copied in 3.560 secs (29914 bytes/sec)
[OK]
asa(config)# quit
asa# quit
Logoff
Connection to asa closed.
bdispatcher@laptop:~$

Para más info sobre la concesión y revocación de estos accesos:
http://www.cisco.com/en/US/docs/security/asa/asa72/configuration/guide/mgaccess.html

Those days I had to configure the Cisco ASA firewall to allow the ASDM access. The rule I need must permit the access to the ip address 192.168.10.200 from the SYS interface.
To do that I logged to the ASA using the already open ssh access and I entered the following:
bdispatcher@laptop:~$ ssh admin@asa
admin@asa's password:
Type help or '?' for a list of available commands.
asa> enable
Password: *********
asa# conf t
asa(config)# http 192.168.10.200 255.255.255.255 SYS
asa(config)# wr
Building configuration...
Cryptochecksum: xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
89743 bytes copied in 3.560 secs (29914 bytes/sec)
[OK]
asa(config)# quit
asa# quit
Logoff
Connection to asa closed.
bdispatcher@laptop:~$

If you need more info about granting and revoking access check this link:
http://www.cisco.com/en/US/docs/security/asa/asa72/configuration/guide/mgaccess.html

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20111003

Nagios DISK UNKNOWN - free space:|

Tengo a medio montar un servidor de Nagios para chequear el funcionamiento de los servidores y servicios de mi organización. Los chequeos que por ahora tengo configurado son los básicos, disco, CPU, memoria, etc.
La cosa es que los chequeos de algunas particiones de mis servidores GNU/Linux me arrojan el siguiente resultado:
     Status: UNKNOWN
     Status information: DISK UNKNOWN - free space: |

Lo primero es conectarme al servidor de Nagios y realizar el chequeo desde la línea de comandos:
bdispatcher@nagserver:~$ /opt/nagios/libexec/check_nrpe -H fileserver -p 5666 -c check_sdd1
DISK UNKNOWN - free space:|

Y obtengo el mismo resultado. Lo siguiente es conectarme al cliente de Nagios, y comprobar la ejecución del plugin check_disk desde este. Copio el chequeo tal cual lo tengo en el fichero nrpe.cfg y lo ejecuto en el terminal:
bdispatcher@fileserver:~$ /opt/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sdd1
DISK WARNING - free space: /opt/files/datos 3696 MB (12% inode=99%);| /opt/files/datos=25003MB;24188;27212;0;30236

Pues aquí sí que funciona. Después de mucho probar y poco pensar, me doy cuenta de que el problema es que el chequeo lo ejecuta el proceso nrpe, que se ejecuta con el usuario nagios, el cual no tiene permisos sobre la ruta /opt/files, así que no puede comprobar el espacio del disco montado sobre esa ruta:
nagios@fileserver:~$ df -h
S.ficheros          Tamaño Usado  Disp Uso% Montado en
/dev/sda1             4,9G  1,3G  3,4G  28% /
/dev/sdc1             9,7G  5,2G  4,1G  57% /opt/files
df: «/opt/files/datos»: Permiso denegado
tmpfs                 506M     0  506M   0% /dev/shm
nagios@fileserver:~$

Para resolverlo, basta con dar permisos a este usuario (más bien se los doy al resto de usuario y restrinjo el acceso más abajo en el árbol, y probamos de nuevo:
bdispatcher@fileserver:~$ sudo chmod 755 /opt/files
bdispatcher@fileserver:~$ su - nagios
nagios@fileserver:~$ df -h
S.ficheros          Tamaño Usado  Disp Uso% Montado en
/dev/sda1             4,9G  1,3G  3,4G  28% /
/dev/sdc1             9,7G  5,2G  4,1G  57% /opt/files
/dev/sdd1              30G   25G  3,7G  88% /opt/files/datos
tmpfs                 506M     0  506M   0% /dev/shm
nagios@fileserver:~$

Al ejecutar ahora el chequeo obtengo el resultado esperado:
bdispatcher@nagserver:~$ /opt/nagios/libexec/check_nrpe -H fileserver -p 5666 -c check_sdd1
DISK WARNING - free space: /opt/files/datos 3696 MB (12% inode=99%);| /opt/files/datos=25003MB;24188;27212;0;30236

Y con esto una piojera menos, y un warning más :-(

I am deploying a Nagios server to schedule some checks over the servers and the services on my organization. First of all, some of the basic checks like disk, CPU, memory, etc.
But some of the disk checks return an unknown status like this::
     Status: UNKNOWN
     Status information: DISK UNKNOWN - free space: |

The first that springs to my mind is to execute this check manually on the Nagios server:
bdispatcher@nagserver:~$ /opt/nagios/libexec/check_nrpe -H fileserver -p 5666 -c check_sdd1
DISK UNKNOWN - free space:|

With the same result, so the next step is to try it again but on the server which has the Nagios client installed. After a fast review of the nrpe.cfg configuration file to copy and paste the check and: 
bdispatcher@fileserver:~$ /opt/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sdd1
DISK WARNING - free space: /opt/files/datos 3696 MB (12% inode=99%);| /opt/files/datos=25003MB;24188;27212;0;30236

Wow!! It works here!! Some days and some tests after, I bump into the big clue. The checking process is executed by the nrpe, running with the user nagios, which has no permissions on the path /opt/files, so it can't check the free space available on the disk mounted on this path:
nagios@fileserver:~$ df -h
S.ficheros          Tamaño Usado  Disp Uso% Montado en
/dev/sda1             4,9G  1,3G  3,4G  28% /
/dev/sdc1             9,7G  5,2G  4,1G  57% /opt/files
df: «/opt/files/datos»: Permiso denegado
tmpfs                 506M     0  506M   0% /dev/shm
nagios@fileserver:~$

All I need to solve it is to give read and execution (access) permissions to this user. I'll cut the access on a lower level on the tree:
bdispatcher@fileserver:~$ sudo chmod 755 /opt/files
bdispatcher@fileserver:~$ su - nagios
nagios@fileserver:~$ df -h
S.ficheros          Tamaño Usado  Disp Uso% Montado en
/dev/sda1             4,9G  1,3G  3,4G  28% /
/dev/sdc1             9,7G  5,2G  4,1G  57% /opt/files
/dev/sdd1              30G   25G  3,7G  88% /opt/files/datos
tmpfs                 506M     0  506M   0% /dev/shm
nagios@fileserver:~$

The next check gives me the expected output:
bdispatcher@nagserver:~$ /opt/nagios/libexec/check_nrpe -H fileserver -p 5666 -c check_sdd1
DISK WARNING - free space: /opt/files/datos 3696 MB (12% inode=99%);| /opt/files/datos=25003MB;24188;27212;0;30236

And that's all folks!

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110928

Firefox: Buscar ignorando mayúsculas - Firefox: case insensitive search

Para los que nos pegamos buena parte del tiempo pegados a la web, buscando información de un tipo u otro, la búsqueda dentro de la página que estamos visitando es una herramienta imprescindible. Para agilizar esta búsqueda, podemos marcar la opción Buscar texto mientras se escribe en Preferencias -> Avanzado -> General. Para que esta búsqueda ignore mayúsculas y minúsculas debemos hacer lo siguiente:
 - En una pestaña introducimos en la barra de direcciones about:config.
 - Con el mensaje ¡Zona hostil para manazas! nos avisan del peligro de manipular la configuración. Aceptamos el riesgo pulsando sobre el botón ¡Tendré cuidado, lo prometo! y aparece un listado de propiedades con su estado, tipo y valor establecido.
 - En el textbox del filtro, escribimos casesensitive.
 - Desaparecen todos las propiedades excepto accesibility.typeaheadfind.casesensitive.
 - Hacemos doble click sobre ella, y establecemos el valor a 0.

Y esto es todo. A buscar sin preocuparse de las mayúsculas.

If you are one of those who spend the time browsing the web, maybe this tool will be helpfull for you. The option Search for text when I start typing is a cool way to find some text on the current web page, and to enable it you have to go to Preferences -> Advanced -> General, but by default the case sensitive option is enabled. This default behavior can be disabled like this:
 -Type about:config on the location bar and press intro.
 - The message Here be dragons! will warn you of the danger of doing something wrong in this advanced configuration section. Click on the I'll be careful, I promise! button to show a table with properties, status, types and values.
 - Write casesensitive on the filter textbox.
 - You'll find the accesibility.typeaheadfind.casesensitive property.
 - Doble click on it, and set de value to 0.

And that's all folks!. Now you can do case unsensitive searches on the page while you're typing.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110916

Habilitar logs de cron en Ubuntu con rsyslog - Enable cron logs in Ubuntu with rsyslog

Para poder registrar los resultados de nuestras tareas programadas de cron en Ubuntu (10.04 LTS en mi caso) con rsyslog debemos hacer lo siguiente:
 - Editamos el fichero /etc/rsyslog.d/50-default.conf
 - Descomentamos esta línea: 
     cron.*                          /var/log/cron.log
 - Podemos cambiar el nivel de logeo (debug, info, etc)
 - Reiniciamos el servicio:
     sudo reload rsyslog
 - Y a funcionar, ya sólo nos falta comprobarlo con sudo tail -f /var/log/cron.log 

En mi caso, ya estaba configurada la rotación de este log dentro del fichero /etc/logrotate.d/rsyslog así que no tengo que preocuparme de que crezca sin control.

To record the result of our scheduled cron task on Ubuntu (10.04 LTS in my case) with rsyslog, we have to:
 - Edit the file /etc/rsyslog.d/50-default.conf
 - Uncomment this line:
     cron.*                          /var/log/cron.log
 - We also can change the warning level (debug, info, etc)
 - Restart the service:
     sudo reload rsyslog
 - And that's all. We can test it with: sudo tail -f /var/log/cron.log 

In my case, the system was already configured to rotate this log on the file: /etc/logrotate.d/rsyslog so we don't have to take care about it grows out of control.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110829

Renombrado de ficheros por lotes - Batch renaming files

Me ha vuelto a pasar!!! He ejecutado el siguiente script desde la línea de comandos para el renombrado de archivos en lotes:
for i in `ls`; do mv $i BKP_$i; done

mediante el cual, añado el prefijo BKP_ a todos los ficheros del directorio de trabajo, peeeeero lo he hecho en la ruta equivocada!!! Así que tengo un montón de archivos a los que les he añadido un prefijo que tengo que quitar.
La solución (o una de ellas) me la ofrece el comando cut. Con él, podemos seleccionar de una cadena de texto, los caracteres que queramos mostrar o quitar (--complement).
El nuevo script para reparar el entuerto sería:
for i in `ls`; do mv $i `echo $i| cut -c 1-4 --complement`; done

Y problema resuelto.

Ups, I did it again!!! I have run the following script from the command line to rename some files:
for i in `ls`; do mv $i BKP_$i; done

to add the prefix BKP_ to all files in the current directory, but I did it on the wrong path!!! So I have lots of files with a prefix to remove.
The solution (or at least, one of them) is to use the command cut. We can use it to choose some characters from a string.
The script to repair my mistake and remove (--complement) this prefix is:
for i in `ls`; do mv $i `echo $i| cut -c 1-4 --complement`; done

And its done!!!

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110826

Event ID 7000 Network Load Balancing

La vuelta de mis tan merecidas vacaciones no está siendo tan ****** como en un principio pensé. Parece que algunos servidores y/o servicios también se han ido de vacaciones y no quieren volver. 
Tengo un W2K3 x86 + SP2 que me está dando una poca guerra. He tenido que aplicar un parche al mismo por un problema que si lo veo resuelto ya comentaré, y durante el inicio del mismo, he visto que me aparecía un alert indicando un error en el visor de sucesos.
Me dirijo al mismo ejecutando eventvwr y en el apartado system, veo el id de suceso: 7000 con Origen: Service Control Manager y la descripción:
El servicio Network Load Balancing no pudo iniciare debido al siguiente error:
No se puede iniciar el servicio, porque está deshabilitado o porque no tiene dispositivos asociados a él.

Busco un poco y encuentro, entre otras muchas páginas, una de Microsoft y otra de Symantec, en las que se resuelve este problema editando el registro para que no se notifique el mismo. Según Microsoft, el error puede aparecer si se hace referencia al servicio Equilibrio de carga de red como un componente en el grupo de inicio de un servicio de otro fabricante.

En mi caso he buscado y puede que el cliente de Backup Exec tenga algo que ver, ya que este aviso aparece aunque no tengas instalado dicho servicio!!. De todos modos, he ejecutado el proceso descrito en los enlaces abajo.

After I came back(up) from my holiday period, I've find out that some server/services had gone to enjoy their vacations too.
I have a  W2K3 x86 + SP2 which wants to have some fun with me! I have to apply a patch on it to solve an issue that will be explained here if I beat it!. But on the next boot, <IRONIC>Yahooo!!! Thanks Microsoft!! I like to reboot my servers just for applying a simple patch</IRONIC>, an alert window advice me that something has failed with the message:
At least one service or driver failed during system startup. Use Event Viewer to examine the event log for his issue may occur if the Network Load Balancing service is referhis issue may occur if the Network Load Balancing service is referenced as a component in the startup group of a third-party service.enced as a component in the startup group of a third-party service.details.

Where I find an error with Event id: 7000, Source: Service Control Manager and description:
The Network Load Balancing service failed to start due to the following error: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. Network Load Balancing is not installed on the system.

After some Internet searching I found some pages, incluiding Microsoft and Symantec  sites, that report this issue and show how to solve it.
The Microsoft site says that this issue may occur if the Network Load Balancing service is referenced as a component in the startup group of a third-party service.
Anyway I have solved the problem by following the procedure explained in the following links:

Sources: 

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110823

Microsoft: Tipos de claves de producto - Product key types

Hoy he tenido que descargar unas ISO de la web de Microsoft, y he visto esto que me ha parecido que podría ser de utilidad para alguno de los lectores del blog (si es que hay alguno a parte de mi madre!):
KMS: Los servicios de administración de clave (KMS) permiten a las organizaciones activar sistemas dentro de su propia red. Así ya no resulta necesario que los equipos individuales conecten con Microsoft para activar productos.

MAK: La clave de activación múltiple (MAK) requiere que cada equipo se conecte una única vez al servidor de activación de Microsoft. Una vez que se hayan activado los equipos, no será necesaria ninguna otra comunicación con Microsoft.

VL Key: Las claves de Volume License (VLK) se utilizan para las activaciones por volumen.


Today I had to download some ISO from the Microsoft web site, and I have seen this that could be interesting for some of my readers (If there is someone apart from my mother!):
KMS: Key Management Service (KMS) allows organizations to activate systems within their own network, eliminating the need for individual computers to connect to Microsoft for product activation.

MAK: A Multiple Activation Key (MAK) requires each computer to connect to a Microsoft activation server one time. Once computers are activated, no further communication with Microsoft is required.

VL Key: A Volume License (VL) Key is used for volume activations.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110717

Comprobando los marcadores con wget- Testing your bookmarks with wget

Hoy, ojeando la página man de wget, me he topado con un método para checkear el fichero de marcadores, favoritos o bookmarks según nos guste, sin necesidad de instalar una extensión.
El comando en cuestión es el siguiente:
wget --spider --force-html -i bookmarks.html

Donde bookmarks.html son los marcadores una vez exportados desde nuestro navegador.
Al ejecutarlo, wget se encarga de ir comprobando los enlaces obteniendo una respuesta HTTP, así que todo lo que no sea 200 ok, es que algo no está funcionando como debiera.

Today, reading the man page of wget, I bumped into a way to check our bookmarks file without any extension.
The only thing we have to do is to run the following command:
wget --spider --force-html -i bookmarks.html

Once done that, wget will check every link on the bookmarks.html file and will return a HTTP response. If we get something different to 200 ok is that there is something wrong.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110629

LibreOffice was unable to find a working e-mail configuration.

LibreOffice es una peaso de suite ofimatica, pero eso no significa que funcione sóla. Para adaptarla a nuestro sistema debemos realizar determinadas configuraciones.
Si al intentar enviar un archivo de LibreOffice pulsando sobre el icono de la aplicación aparece el siguiente error:
LibreOffice was unable to find a working e-mail configuration.
Please save this document locally instead and attach it from within your e-mail client.

Sólo tienes que seguir estos sencillos pasos para vincular tu cliente de email favorito con este peaso de suite ofimática.
1.- Ir a: Herramientas -> Opciones -> Internet -> E-mail
2.- Introducir la ruta de tu cliente de email preferido.

LibreOffice is a great office suite, but we have to make some configurations to use its whole power.
If you're trying to send a document by email clicking on the icon into LibreOffice and get the following error:
LibreOffice was unable to find a working e-mail configuration.
Please save this document locally instead and attach it from within your e-mail client.

You only have to follow these easy steps:
1.- Go to: Tools -> Options -> Intenet -> E-mail
2.- Enter the path of your favorite email client.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110625

Error actualizando el paquete ubufox - Error upgrading the ubufox package

Hoy me he desayunado con una actualización de Ubuntu/Kubuntu que no quería funcionar. Días atrás el sistema actualizó Mozilla Firefox de su versión 4 a la 5 (otros que han entrado en la carrera de las release versions) y funcionó a la perfección, pero hoy, al actualizar el paquete ubufox obtenía el siguiente error:
bdispatcher@laptop:~$ sudo apt-get upgrade
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias      
Leyendo la información de estado... Hecho
Se actualizarán los siguientes paquetes:
  ubufox
1 actualizados, 0 se instalarán, 0 para eliminar y 0 no actualizados.
8 no instalados del todo o eliminados.
Se necesita descargar 0B/58,3kB de archivos.
Se utilizarán 319kB de espacio de disco adicional después de esta operación.
¿Desea continuar [S/n]? s
(Leyendo la base de datos ...  00%
209465 ficheros y directorios instalados actualmente.)
Preparando para reemplazar ubufox 0.9-0ubuntu1~mfs~lucid1 (usando .../ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb) ...
Desempaquetando el reemplazo de ubufox ...
dpkg: error al procesar /var/cache/apt/archives/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb (--unpack):
 intentando sobreescribir `/etc/xul-ext/ubufox.js', que está también en el paquete xul-ext-ubufox 0:0.9-0ubuntu1~mfs~lucid1
Se encontraron errores al procesar:
 /var/cache/apt/archives/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Según creo entender, parece que a los mantenedores los paquetes ubufox y xul-ext-ubufox se les ha colado el fichero /etc/xul-ext/ubufox.js, y no gestionan bien la existencia del mismo.
Así que ante mi desconocimiento, he mirado a ver que era dada uno de estos paquetes:
bdispatcher@laptop:~$ apt-cache show ubufox
Package: ubufox
Priority: optional
Section: web
Installed-Size: 352
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
Architecture: all
Version: 0.9.1-0ubuntu0.10.04.1~mfn3
Recommends: firefox | abrowser
Provides: abrowser-ubufox, firefox-ubufox, xul-ext-ubufox
Depends: apturl (>= 0.1.2ubuntu1) | apturl-kde
Enhances: abrowser, firefox
Filename: pool/main/u/ubufox/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb
Size: 58306
MD5sum: 5e1b720cd3562e9c014d5e40c7aaccfa
SHA1: 81b36748905c704d62ab34c39856dc9f942836a4
Description: Ubuntu Firefox specific configuration defaults and apt support
 Extension package for Firefox provides ubuntu specific configuration defaults
 as well as apt support for firefox plugins/extensions.
 .
 You can uninstall this package if you prefer to use a pristine firefox
 install.
[...]

bdispatcher@laptop:~$ apt-cache show xul-ext-ubufox
Package: xul-ext-ubufox
Source: ubufox
Priority: optional
Section: web
Installed-Size: 336
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
Architecture: all
Version: 0.9-0ubuntu1~mfs~lucid1
Recommends: firefox | abrowser
Replaces: ubufox (<< 0.9~rc2-0ubuntu3)
Provides: abrowser-ubufox, firefox-ubufox, ubufox
Depends: apturl (>= 0.1.2ubuntu1) | apturl-kde
Enhances: abrowser, firefox
Breaks: ubufox (<< 0.9~rc2-0ubuntu3)
Filename: pool/main/u/ubufox/xul-ext-ubufox_0.9-0ubuntu1~mfs~lucid1_all.deb
Size: 55138
MD5sum: Descriptionfbabfde31f15e6db5c665f975716db5f
SHA1: 22127c90b755a83139cf80b007a6c94e0d296878
Description: Ubuntu-specific configuration defaults and apt support for Firefox
 Adds Ubuntu-specific modifications to Firefox.
 .
 Integrates the browser with Ubuntu to:
 * Enable searching for missing plugins from Ubuntu software catalog
 * Add the following options to the Help menu
 - Get help on-line
 - Help translating Firefox
 - Ubuntu Release Notes
 * Set homepage to Ubuntu Start Page
 * Display a restart notification after upgrading Firefox
 * Add ask.com to the search engines.
 .
 You can uninstall this if you prefer to use a pristine Firefox install


Así que visto lo visto, pensando que pudiendo prescindir de los dos, si tengo que elegir uno a eliminar es xul-ext-ubufox, y entendiendo que este error de dependencias lo subsanarán más bien pronto, procedo a desinstalarlo.
sudo apt-get remove xul-ext-ubufox

Ahora ya se instala ubufox sin problema.

Last days my Ubuntu/Kubuntu laptop had updated the Mozilla Firefox from the 4 to 5 release version (It seems that they had joined the release version race too).
Today I had to deal with the following error update the ubufox package:
bdispatcher@laptop:~$ sudo apt-get upgrade
Reading package list... Done
Building dependency tree
Reading state information... Done

The following packages will be upgraded:
  ubufox
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Ned to get 0B/58,3kB de archives.
After unpaking 319kB of additional space will be used.
Do you want to continue [Y/n]? y
(Reading database ...  00%
209465 files and directories currently installed.)
Preparing to replace ubufox 0.9-0ubuntu1~mfs~lucid1 (using .../ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb) ...
Unpacking replacement ubufox ...
dpkg: error proccessing /var/cache/apt/archives/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb (--unpack):
 trying to overwrite `/etc/xul-ext/ubufox.js', which is also in package xul-ext-ubufox 0:0.9-0ubuntu1~mfs~lucid1
Error were encountered while processing:
 /var/cache/apt/archives/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

In my opinion the mantainer had made a little mistake with the file /etc/xul-ext/ubufox.js, in the ubufox and the xul-ext-ubufox packages.
So I took a look to get some info of this packages:
bdispatcher@laptop:~$ apt-cache show ubufox
Package: ubufox
Priority: optional
Section: web
Installed-Size: 352
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
Architecture: all
Version: 0.9.1-0ubuntu0.10.04.1~mfn3
Recommends: firefox | abrowser
Provides: abrowser-ubufox, firefox-ubufox, xul-ext-ubufox
Depends: apturl (>= 0.1.2ubuntu1) | apturl-kde
Enhances: abrowser, firefox
Filename: pool/main/u/ubufox/ubufox_0.9.1-0ubuntu0.10.04.1~mfn3_all.deb
Size: 58306
MD5sum: 5e1b720cd3562e9c014d5e40c7aaccfa
SHA1: 81b36748905c704d62ab34c39856dc9f942836a4
Description: Ubuntu Firefox specific configuration defaults and apt support
 Extension package for Firefox provides ubuntu specific configuration defaults
 as well as apt support for firefox plugins/extensions.
 .
 You can uninstall this package if you prefer to use a pristine firefox
 install.
[...]

bdispatcher@laptop:~$ apt-cache show xul-ext-ubufox
Package: xul-ext-ubufox
Source: ubufox
Priority: optional
Section: web
Installed-Size: 336
Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
Architecture: all
Version: 0.9-0ubuntu1~mfs~lucid1
Recommends: firefox | abrowser
Replaces: ubufox (<< 0.9~rc2-0ubuntu3)
Provides: abrowser-ubufox, firefox-ubufox, ubufox
Depends: apturl (>= 0.1.2ubuntu1) | apturl-kde
Enhances: abrowser, firefox
Breaks: ubufox (<< 0.9~rc2-0ubuntu3)
Filename: pool/main/u/ubufox/xul-ext-ubufox_0.9-0ubuntu1~mfs~lucid1_all.deb
Size: 55138
MD5sum: Descriptionfbabfde31f15e6db5c665f975716db5f
SHA1: 22127c90b755a83139cf80b007a6c94e0d296878
Description: Ubuntu-specific configuration defaults and apt support for Firefox
 Adds Ubuntu-specific modifications to Firefox.
 .
 Integrates the browser with Ubuntu to:
 * Enable searching for missing plugins from Ubuntu software catalog
 * Add the following options to the Help menu
 - Get help on-line
 - Help translating Firefox
 - Ubuntu Release Notes
 * Set homepage to Ubuntu Start Page
 * Display a restart notification after upgrading Firefox
 * Add ask.com to the search engines.
 .
 You can uninstall this if you prefer to use a pristine Firefox install

No I have some more info about these packages I decide to remove the xul-ext-ubufox, while wait to the maintainer solution:
sudo apt-get remove xul-ext-ubufox

Now you can install ubufox without any problem.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

Editando:
He seguido leyendo y he encontrado esta otra solución:
1.- busca dentro de la caché de tu sistema el paquete ubufox:
find /var/cache/apt/ -name "ubufox*"

2.- instálalo con este comando:
sudo dpkg -i --force-overwrite _path_to_ubufox_package

3.- repara las dependencias:
sudo apt-get install -f

Y listo!!

Edditing:
I kept on reading and found another solution.
1.- look for the ubufox package into your system cache folder:
find /var/cache/apt/ -name "ubufox*"

2.- install the package using this command:
sudo dpkg -i --force-overwrite _path_to_ubufox_package

3.- run the following command to fix dependencies:
sudo apt-get install -f

And it's done!!!