Fedora 23 image for Hummingboard/Cubox-i

I have created a Fedora 23 image for Hummingboard/Cubox-i. I will also create a Fedora 24 image as soon as it is released.

wget https://googledrive.com/host/0B1Z2aFriRL5PUGpzMHRVbDBNYU0 -O Fedora-Minimal-armhfp-cubox-i_hb-23-10-sda.raw.xz

The MD5 hash of this file is aa854909d5e3c9f76a964635b9c4f790

Make a dump of your MySQL DB on OpenShift

If you want to make a backup of your database or just want to create a dump to migrate your db to another provider, you need to do these steps:

1. Connect to your running application trough SSH. To do that you need to click this link on OpenShift and run the displayed command.

Screen Shot 2016-05-16 at 11.56.00 AM

2. Create the dump using this command:

mysqldump -u $OPENSHIFT_MYSQL_DB_USERNAME -h $OPENSHIFT_MYSQL_DB_HOST --password=$OPENSHIFT_MYSQL_DB_PASSWORD $OPENSHIFT_GEAR_NAME > dump.sql
gzip dump.sql

3. After that you can scp the dump to any location you want.

WordPress configuration for OpenShift

If you are trying to upload a WordPress site to OpenShift you will have to make the following adjustments to your wp-config.php file:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME',$_ENV['OPENSHIFT_GEAR_NAME']);

/** MySQL database username */
define(‘DB_USER’, $_ENV[‘OPENSHIFT_MYSQL_DB_USERNAME’]);

/** MySQL database password */
define(‘DB_PASSWORD’, $_ENV[‘OPENSHIFT_MYSQL_DB_PASSWORD’]);


/** MySQL hostname */
define('DB_HOST', $_ENV['OPENSHIFT_MYSQL_DB_HOST'] . ':' . $_ENV['OPENSHIFT_MYSQL_DB_PORT']);

This will help WordPress to use the environment variables that OpenShift setup to connect to MySQL.

Review: Netflix en Argentina

Today is the first day of  Netflix in Argentina, the subscription is easy, you have to give them your credit card information (ouch!) and you will get a free subscription for one month. At the second month they will charge it directly to your credit card without asking.

As a first look, some things are missing, like Linux support (-5 points in my personal scale). And subtitles, you only can watch a movie in spanish, portuguese or english but with no subtitles (-2). But a good point is that there is a lot of movies or series to watch. (+2).

That is what I could look so far… Maybe watching a movie I could find more things to complain. 😛

Edit: While using full screen on Firefox, movie freezes

Spanish

Hoy se estreno el servicio de Netflix en Argentina, la suscripción es fácil, te piden los datos de tu tarjeta de crédito (paranoicos abstenerse) y el servicio es gratis el primer mes. Pasado el primer mes te cobran de la tarjeta de credito que les diste.

En principio faltan algunas cosas, es de publico conocimiento que no funciona en Linux (-5 puntos en mi escala personal). La variedad de películas y series es muy interesante (+2), pero se puede elegir solamente el audio. No hay subtitulo, así que podemos ver las películas dobladas en castellano, portugués o en su idioma original sin subtitulo. ( – 2 )

Por ahora eso es lo que pude revisar! sera cuestión de sentarse a ver una peli para ver si encuentro algun otro problema..
Edit: Al poner pantalla completa en Firefox se congela la pelicula.

How to allow a user to run a single command as root via sudo

In order to allow a user to run a single command as root using sudo run the following as root:

echo "user ALL= NOPASSWD : /bin/file" >> /etc/sudoers

Where user is the specified username and /bin/file if the path to the binary that we are allowing this user to run.

If you want to do further changes to the sudoers file it’s recommended to use the command ‘visudo’ to do so.

Español

Para poder hacer esta tarea solo tenemos que ejecutar el siguiente comando como root:

echo "user ALL= NOPASSWD : /bin/file" >> /etc/sudoers

Donde user es el usuario al que le queremos dar permisos y /bin/file es la dirección o path es el archivo binario que le vamos a permitir ejecutar.

Para hacer más cambios al archivo sudoers es recomendable utilizar el comando ‘visudo’.

Red Hat Linux 6.2

I remember like if it was today the first time I installed Linux in my computer. I was 12 years ago and I bought a magazine, from Spain, that came with the CD of Red Hat 6.1.

I completely destroyed my partition table with Disk Druid, that I don’t know how could recover later. Once the installation was complete,  several days after the issue, I started to fight with my monitor to use 1024 x 768, the only way was using a very low horizontal frequency between 50-60 Hz, but I had to fight with Vertical frequency as well to get it working. Once working as the frequency was low it wasn’t really good for my eyes but it looked nice for screenshots. I used to take lots of screenshots that I have to find some day to post them.

I’m sharing this VM with the world, I’m planning to start uploading VM’s of old Linux distributions, so everyone can see how GNU/Linux was 10 years ago or maybe when it started.

How to install it?

As root:

# wget https://mkreder.com/vms/redhat/6.2/redhat62.xml -O /etc/libvirt/qemu/redhat62.xml
# wget https://mkreder.com/vms/redhat/6.2/redhat62.img.gz -O /var/lib/libvirt/images/redhat62.img.gz
# gzip -d /var/lib/libvirt/images/redhat62.img.gz
# restorecon -R /etc/libvirt/qemu/
# restorecon -R /var/lib/libvirt/images

Español

Me acuerdo como si fuese hoy la primera vez que instale Linux en mi PC. Yo tenia 12 años y había comprado una revista española que venia con el CD de Red Hat Linux 6.1.

Destruí completamente mi tabla de particiones con Disk Druid, todavía no se como hice para recuperarla. Una vez que complete la instalación, después de varios días. Empece a pelearme con mi monitor para que funcione a 1024×768, la único que pude hacer para que funcione fue usar una frecuencia horizontal entre 50-60 Hz, pero aun así tenia que pelearme con la vertical. Una vez que funcionaba, parpadeaba un poco, no era lo mejor para mis ojos, pero podía sacar mejores screenshots, me encantaba coleccionar screenshots. Algún día cuando las encuentre las posteare.

 

Subí esta VM para que cualquiera pueda bajarla y usarla. Quizás empiece a subir VM’s de distros viejas así todos pueden ver como era GNU/Linux 10 años atrás o quizás cuando empezó.

Como la consigo?

Como root:

# wget https://mkreder.com/vms/redhat/6.2/redhat62.xml -O /etc/libvirt/qemu/redhat62.xml
# wget https://mkreder.com/vms/redhat/6.2/redhat62.img.gz -O /var/lib/libvirt/images/redhat62.img.gz
# gzip -d /var/lib/libvirt/images/redhat62.img.gz
# restorecon -R /etc/libvirt/qemu/
# restorecon -R /var/lib/libvirt/images

trying to run old Red Hat version in KVM, failed

Some days ago I felt some nostalgic feelings and I tried to install a red hat 6.2 version into a fedora 14 host.

The installation was painfully slow, but it was completed successfully anyway. The problem is that after booting the new (not really) redhat 6..2, I got a kernel panic with the following message:

Kernel panic: Kernel compiled for Pentium+, requires TSC”

after googling that, I found that one of the solutions would be recompile the old linux kernel with the option “Unsynced TSC support”, I’m to lazy to do that just for fun, I would do it if I have no choice, but I have some doubts, why the kernel in the installation cd is not failing? and, is it because my computer has an AMD processor?

Español

Hace algunos días sentí un poco de nostalgia y trate de instalar redhat 6.2 en mi PC con fedora 14

La instalación fue bastante lenta, pero se completo sin mayores problemas. El problema es que después de bootear la nueva (chiste!) instalación, obtuve un kernel panic con el siguiente mensaje:

“Kernel panic: Kernel compiled for Pentium+, requires TSC”

Después de googlear un rato, encontré que una de las soluciones seria recompilar el kernel del viejo linux, con la opción, “Unsynced TSC Support”, lo haría pero soy demasiado perezoso para hacer eso. Pero me quedan algunas dudas, porque el kernel del cd no fallo? este fallo es porque mi PC tiene procesador AMD? hmmm, no lo sé

unrealircd hacked =(

Hace un par de días descubrí en mi servidor de IRC unos archivos “raros” en el /tmp, que obviamente yo no había generado:

-rw------- 1 ircd ircd 17251 Jul 8 09:10 robot.txt
-rw------- 1 ircd ircd 17251 Jul 8 09:10 robot.txt.1

El contenido de estos archivos era un script.
La explicación de mas o menos que es lo que hace dicho script, la pueden ver en este link

En definitiva, unrealircd reporto hace poco (el 12 de junio), en su foro el problema. Al parecer, alguien cambio el .tar.gz en los mirrors de unrealircd por uno que contenía un backdoor (esto paso en Noviembre 2009), el cual permitía a cualquier persona ejecutar cualquier comando como el usuario con el corría el ircd (esos nos sigue enseñando a todos que no hay que correr servicios como root). Así que alguien, muy vivo, exploto esta falla en nuestro IRC (irc.xterm.com.ar), pero al parecer mucha maldad no hizo.

Si tu unrealircd esta comprometido o no, se puede probar de estas 2 formas:

Verificar el checksum md5 si todavia tienen el .tar.gz:
(MALA) es: 752e46f2d873c1679fa99de3f52a274d
Versión Oficial (BUENA) es: 7b741e94e867c0a7370553fd01506c66

La otra forma es pararse en el directorio donde lo compilamos y correr:
grep DEBUG3_DOLOG_SYSTEM include/struct.h
Si, el resultado son 2 lineas entonces tenemos la versión mala, si el resultado es nada entonces es la buena.

La solución es re-descargar el unrealircd y validar que sea el correcto por GPG o MD5/SHA1.

Deberé seguir confiando en unrealircd? o deberíamos mudarnos a otro?

English:

Some days ago I found in my IRC server, a couple of “weird” files in the /tmp directory, that obviously I did not create.

-rw------- 1 ircd ircd 17251 Jul 8 09:10 robot.txt
-rw------- 1 ircd ircd 17251 Jul 8 09:10 robot.txt.1

The content of these files was a malicious script.
The explanation about what does this script does can be reached at this link

unrealircd reported some days ago (June 12) in their forum the problem. Apparently someone changed the .tar.gz package in their mirrors for one that contained a backdoor (this happened in November 2009). This backdoor allowed any person to run any command with the privileges of the user running the service (this is still remember us that we must not run services as root) .
Someone exploited this bug in our IRC (irc.xterm.com.ar), but apparently nothing bad happened for us.

If you need to check if your unrealircd is compromised or not, you can try this with one of these two ways:

Verifying the MD5 checksum of the .tar.gz package:
(BAD) is: 752e46f2d873c1679fa99de3f52a274d
Official version (GOOD) is: 7b741e94e867c0a7370553fd01506c66

The other way, is change to the directory where we compiled the source code and then run:
grep DEBUG3_DOLOG_SYSTEM include/struct.h
If it outputs 2 lines, then you’re hacked.
if it outputs nothing, then you’re good.

The solution is re-download unrealircd and validate that it’s the good package by checking GPG or MD5/SHA1 checksum

May I continue using unrealircd? or do I need to move to a new one?

Resumir las descargas del firefox en Linux o cualquier Unix

Lamentablemente, cuando cancelamos una descarga con firefox, no hay modo de volverla a iniciar desde el navegador y eso es bastante molesto, ya que si por ejemplo estamos en una laptop y nos queremos ir hacia otro lugar o simplemente cambiar de red wifi, perdemos lo que sea que estamos descargando.

Por esto mismo, es muy buena esta función y es muy sencillo, que en caso de estar bajando el archivo ftp://sunsite.doc.ic.ac.uk/ls-lR.Z luego de interrumpirlo con el firefox, posicionarnos en el directorio donde se encuentra el archivo, ejecutamos:

wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z

Espero que les sirva,

d.