On the fly

    [10:06:56 PM] Herbert West: it looks like it does not like the password
    [10:07:01 PM] Herbert West: one sec
    [10:07:15 PM] Stefanita Rares Dumitrescu: well shoot man :)))
    [10:07:19 PM] Stefanita Rares Dumitrescu: hope it’s not the password
    [10:09:49 PM] Herbert West: it was my stupid ssh client
    [10:10:09 PM] Herbert West: it converted $ to 0’s
    [10:10:10 PM] Stefanita Rares Dumitrescu: great stuff :)
    [10:10:14 PM] Stefanita Rares Dumitrescu: well
    [10:10:18 PM] Stefanita Rares Dumitrescu: that looks like a gold digger
    [10:10:18 PM] Jeremy: ah sorry about that Rares
    [10:10:26 PM] Stefanita Rares Dumitrescu: only hoes convert $’s in 0’s
    [10:10:30 PM] Jeremy: lol


    Doar fum

    Stateam amandoi si ne uitam la cerul gri. Mai era doar o conserva intre noi. Nici nu stiu ce fel de conserva ar fi trebuit sa fie. Eram furios. Furios pe mine pentru ca nu putem mai mult si nu gasisem nimic altceva prin atatea caramizi. Am deschis-o si i-am lasat-o ei. Stiam ca eu pot mai mult. Eu pot sa indur, eu sunt Batman … cacat astea sunt fraze din trecut pe care le repet atunci cand imi e foame. Conteaza ce pot sa fac pentru altcineva anyway. Nu contest faptul ca si eu contez, dar stiu ca eu pot mai mult, dar ca sa ajung sa reusesc sa imi depasesc posibilitatile trebuie sa ajung la acele limite peste care cred ca nu pot trece, dar dupa o perioada de timp reusesc …

    Tot timpul am crezut ca pot mai mult, doar ca acum … as vrea un pic de reasigurare, sa stiu cine sunt, sa stiu unde ma indrept, sa stiu  … desi stiu tot ce a fost si ce va urma, as vrea sa stiu ca totul nu e in zadar.

    Cu siguranta nu o sa am mila, si cu siguranta nu va voi ierta pentru ce ati facut, dar asta nu inseamna ca nu va voi asculta. Sunt un judecator drept, si veti avea parte din minutele mele pretioase. Rezultatul va fi acelasi oricum, dar macar veti avea parte de iluzia de optiune pe care eu din bunatatea mea infinita va voi oferi.

    Si totusi ce pula mea de conserva e asta … Cat imi pierd eu timpul aici cu lucruri marunte … cand tu nu poti mai mult … atat de putin, atat de incomplet, atat de imperfect …

    Nu ne facem griji oricum. Daca eu sunt aici puteti incerca sa detronati regele cat vreti, nu ati fi primii. De-aia la picioarele tronului stau trecuturi cu gaturi rupte.

    Mai incolo poate, cand o sa meritati. Acum, cu siguranta nu.

    Si totusi ce conserva …


    Install and configure Pure-FTPd with multiple users on CentOS 6

    So, let’s say you want to do FTP virtual users on CentOS 6. Here’s a quick how-to:

    yum install pure-ftpd

    Edit: /etc/pure-ftpd/pure-ftpd.conf and make the following changes:

    -PAMAuthentication yes

    +#PAMAuthentication yes

    -#PureDB /etc/pure-ftpd/pureftpd.pdb

    +PureDB /etc/pure-ftpd/pureftpd.pdb

    Turn the daemon on:

    chkconfig pure-ftpd on

    service pure-ftpd restart

    Let’s add the first users then ?

    pure-pw useradd $USERNAME -u $USER -g $GROUP -d /path/to/ftp/directory
    $USERNAME = FTP username
    $USER = System username – the username which will own the files/folders created by the virtual FTP users
    $GROUP = System groupname – the groupname which will own the files/folders created by the virtual FTP users
    /path/to/ftp/directory = Directory location for the FTP to jail to (such as /var/www/htdocs/)

    Restart the FTP server for the new users to take effect :

    pure-pw mkdb

    service pure-ftpd restart

    Great ! Now you can login with your brand new created virtual FTP users on Pure-FTPD – CentOS6


    Tags: , , ,

    Install OSSEC – Ubuntu

    Over the years i kept increasing the number of servers i manage and although running operations from Windows is a breeze, i setup an Ubuntu 14.10 desktop inside VMWare so i have a local platform for testing new stuff i want to implement, and maybe make things slightly easier since i spend most of my time in the linux terminal.

    Today i have been playing with OSSEC, and here’s a quick tutorial on how to get the stuff rolling:

    1 – First off you will need a bunch of dependencies. Since my local install is a vanilla desktop, from which i am typing right now, there’s a bunch of things to setup:

    apt-get install build-essential apache2 libapache2-mod-php5 apache2-utils zlib1g-dev libssl-dev

    If there’s dependencies that you are missing at some point, do yourself a favor and install apt-file. It will make searching for packages that would satisfy that dependency a breeze.

    apt-get install apt-file
    Let’s say you’re missing zlib.h, all you have to do is apt-file search zlib.h. Done

    2 – Get the sources for the server and the web ui from git:

    cd /opt

    git clone https://github.com/ossec/ossec-hids.git

    git clone https://github.com/ossec/ossec-wui.git

    3 – Install OSSEC

    cd /opt/ossec-hids;./install.sh

    The only parameters you would usually have to modify is the e-mail address, and the server type. I chose “local” for my installation, but feel free to type help and read on the different options.

    4 – Install ossec-wui – the web interface:

    cd /opt/;mv ossec-wui /var/www/html;cd /var/www/html/ossec-wui;./setup.sh

    Nothing to modify here, and i suggest you leave the paths the same for both ossec and wui

    5 – Fix some permissions stuff:

    usermod -a -G ossec www-data

    cd /var/www/html/ossec;chgrp www-data tmp;chmod 770 tmp

    6 – Start apache;

    service apache2 start

    7 – Open up the browser, go to http://localhost/ossec-wui and voila, you should see the system logs … logged

    Tags: , , ,

    Ubuntu recovery – read/write

    If you’re trying to boot Ubuntu in recovery mode to try to fix some stuff, it will mount the partitions read only. Use the thingie below, and you will be able to … do your thing.

    mount -o rw,remount /

    NetworkManager overwriting /etc/resolv.conf – how to fix

    So, this may happen every now and then, when someone relies on NetworkManager to do the CentOS/RHEL server setup: you get in your /etc/resolv.conf mods, and at reboot, that stuff changes.

    Thankfully, the fix is easy:

    edit your: /etc/sysconfig/network-scripts/ifcfg-ethXX where XX is your interface number, and set:


    Now get your /etc/resolv.conf back, and reboot, and voila! Your changes are not modified anymore

    Tags: , , , ,

    Shared object “libstdc++.so.6″ not found, required by “arcconf”

    The error below, happens usually on FreeBSD10:

    Shared object “libstdc++.so.6″ not found, required by “arcconf”

    The problem with this, is that the binaries are compiled by Adaptec. The solution is pretty easy tho:

    cd /usr/ports/misc/compat9x && make install distclean 

    Done, your arcconf utility is now working.

    Tags: , , ,

    libicui18n.so.52, needed by /usr/local/lib/liblqr-1.so.3

    If you get:

    libicui18n.so.52, needed by /usr/local/lib/liblqr-1.so.3

    This happens because icu has been upgraded to .53. Reading /usr/ports/UPDATING is your friend.

    How to work it out ?

    If you use portmaster:
    portmaster -w -r icu
    If you use portupgrade:
    portupgrade -fr devel/icu
    If you use pkgng with binary packages:
    pkg install -fR devel/icu

    Easy fix as usual

    Tags: , , , ,

    doesn’t install the Apache module anymore: update your OPTIONS and build www/mod_php5 port instead

    Another thing i came upon today, which happens to have an easy fix, is this:

    When you upgraded your ports, and some option got changed, you will probably get:

    doesn’t install the Apache module anymore: update your OPTIONS and build www/mod_php5 port instead

    Now, since you already upgraded the ports tree, the option that you should uncheck and reconfigure the port is already gone, so you can’t fix it like that.

    What you can do, is remove and reconfigure ports options, in my case being the php5-extensions

    What i did was:

    cd /usr/ports/lang/php5-extensions

    make rmconfig-recursive


    make config-recursive

    You will be prompted to reconfigure the options, and your upgrading will work just fine

    Tags: , ,

    Activate FreeBSD ipfw without recompiling the kernel

    This has been bugging me quite a bit, i used to recompile the kernel every time just to add ipfw support.

    In FreeBSD 10, you can do it without rebuilding the kernel:


    Add the above to /boot/loader.conf – create the file if it’s not already there.

    Reboot and you’re good to go!

    Tags: , , , ,