Hi There.

I was currently installing mysql on my workstation when this lovely error pop out.  Searching on the net I found this solution:

Usually this error happens when /etc/passwd and /etc/master.passwd are out of sync.

Note: Be careful when tampering with /etc/passwd

To fix my problem I’ve run vipw and deleted the last user that was causing problem, in that case mysql and saved the file. Voila!

Small crash course on how to use vipw  (for thoses who don’t know it uses the vi interface)

To delete a line, go to the line you want to delete and press twice on the letter d.

If you want to save the file enter exactly :w! enter.

To quit press :q! enter.

Or one command that does it all :wq! enter.

Have a great day!

Dear readers

When you install squid proxy server from the binairy packages it is already configured to use the dns server mentionned in the /etc/resolv.conf file.  But what if you wanted to disable it and use an external dns server for whatever the reasons.

You need to install the squid server from the freeBSD ports.  I will do a post on ports later this week.

Update your port tree:

# portsnap fetch update

Now that it is updated go to the squid folder

# cd /usr/ports/www/squid/

Edit Makefile file to have the special configure argument “–disable-internal-dns” at the line CONFIGURE_ARGS=    # Dont forget to add \ after the last parameter to indicate a newline and  remove the double quotes.

# nano Makefile

Now build the squid port

# make install clean

Edit rc.conf so that squid runs at every startup and the line squid_enable=”YES”

You need to add a dns server to the the squid config file since the internal dns is disabled.

# echo “dns_nameservers” >> /usr/local/etc/squid/squid.conf

You can go ahead and start the service

# service squid start

By default the squid port is 3128 so you can try and connect to your server with google-chrome if you want.

# google-chrome –proxy-server=

Enjoy your server.


Dear readers

*unix systems have different ways to configure there network interfaces.

On freeBSD, alot of configurations are done in the /etc/rc.conf file.

So if you have already install your freeBSD system and want to go from DHCP to static check this out.

For dhcp use edit the /etc/rc.conf with the following line


For static ip edit the /etc/rc.conf with the following line

ifconfig_em0=”inet netmask″

add the following line for the /etc/rc.conf, so that your system knows where is your internet gateway.


Hope this helped you.


Nano text editor keyboard shortcuts

Posted: December 16, 2014 in bash

Simple list of nano’s keyboard shortcuts

Alt-6      copy

Ctrl-U    paste

Ctrl-K    cut

Ctrl-O    save file

Ctrl-X     save file and exit


Dear Readers

Depending on your login manager (xdm, gdm, slim etc) you need to edit a configuration file to

deactivate the listening port 6000 if it is not needed or just for security reasons.

It is quite simple.

In freeBSD the slim.conf is located in /usr/local/etc/slim.conf

Change the line below

xserver_arguments    vt09


xserver_arguments   -nolisten tcp vt09

Then either reboot your system or type:

# sudo service slim restart

For linux (debian, ubuntu) the configuration file is located in the /etc/slim.conf



Dear Readers

The new package manager pkg is really a beauty, it runs well and well rounded with a nice syntax.

But it will happen to you that even toe you’ve updated the repository list it will still give you the following error :

“size mismatch, fetching from remote”  and “size mismatch, cannot continue” when trying to fetch one of your

favorite programs.

First reflex as a old linux user is to update the repository “pkg update” which doesn’t yield any results, your still getting

the error “size mismatch, fetching from remote” and “size mismatch, cannot continue".

To solve this :

Use the -f option to force the re-downloading of the repositories.

sudo pkg update -f



Dear Readers

Using find on a Unix-like system is probably one of the most important command you need to learn.

It can be use to make backup scripts, find a simple file or a directory.

A simple way to use find is the following :

find / -iname “*.mp3”

The -iname option will tell find to look for files with Upper and lowercase.

But if you want to find multiple files types like, mp4,avi and mkv all at the same time and print the output you use the following.

find . \( -type f -iname ‘*.mp4’ -o -iname ‘*.avi’ -o -iname ‘*.mkv’ \)

Use the man page for more information.