CentOS wifi howto setup

    Hi,

    So here are the instructions for getting the wifi rolling:
    ——————————————
    yum -y install wireless-tools wpa_supplicant dbus
    ——————————————
    ifconfig wlan0 up
    iwlist wlan0 scan

    record the channel number
    ifconfig wlan0 down
    ——————————————
    create /etc/sysconfig/network-scripts/ifcfg-wlan0 with the contents below and the instructions mentioned below:

    DEVICE=wlan0
    HWADDR=<your-mac-address>
    TYPE=Wireless
    UUID=<an-optional-uuid> #generate one with uuidgen
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=dhcp
    PEERDNS=yes
    USERCTL=yes
    NETWORKING_IPV6=no
    ESSID=<your-ssid> # you should either know this or take it from the iwlist wlan0 scan
    CHANNEL=<ssid-channel> #the channel you got from when you ran iwlist wlan0 scan
    MODE=Managed
    RATE=Auto
    ——————————————
    chkconfig NetworkManager off
    ——————————————
    edit /etc/sysconfig/wpa_supplicant and add the wlan name: INTERFACES=”-iwlan0″
    ——————————————
    load the encrypted passphrase in the supplicant
    wpa_passphrase <ssid> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant.conf
    ——————————————
    chkconfig messagebus on
    chkconfig wpa_supplicant on
    ——————————————
    If the wireless is the only active option, edit /etc/sysconfig/network-scripts – the configs for ifcfg-eth0 and 1 and set onboot to no, so that the route goes over wifi.
    ——————————————
    reboot

    Everything should be good to go.

    Tags: , , , ,

    Doing code and rap battles

    [6:04:33 PM] Radu: hahaha
    [6:04:39 PM] Radu: eu nush ce sa fac
    [6:04:53 PM] Radu: ascult rap :))
    [6:04:58 PM] Scobee: :)))
    [6:05:20 PM] Radu: rares e plin de basini bratele ii scriu simultan parca sunt doua masini
    [6:05:22 PM] Radu: :))
    [6:05:26 PM] Scobee: :)))))
    [6:06:06 PM] Radu: ce versuri fac astia
    [6:06:16 PM] Radu: a facut unul un soundtrack si l-a dat pe net si fac astia leapsa cu el
    [6:07:11 PM] Radu: codu e mingea mea si bag ca messi si rares baga cox ca mutu si e plin de impresii
    [6:07:13 PM] Radu: :))))
    [6:07:36 PM] Stefanita Rares Dumitrescu: ce ma?
    [6:07:37 PM] Stefanita Rares Dumitrescu: :)))
    [6:07:42 PM] Radu: versuri :)))
    [6:08:29 PM] Scobee: bag cu Sonia ca baiatu rares da laba ca spartu
    [6:08:46 PM] Radu: te irita ca ai coaiele mici, mai da-le cu talc eu pe lume am doar codu si ce tin pe crac
    [6:08:47 PM] Radu: :)))
    [6:09:18 PM] Radu: asta era tot pt rares
    [6:09:19 PM] Radu: :)))
    [6:10:31 PM] Radu: sar eu pe femei, rares e dul?u, face mare t?mb?l?u ca orice p?mp?l?u
    [6:10:34 PM] Radu: :)))
    [6:18:16 PM] Stefanita Rares Dumitrescu: wtf is going on
    [6:18:17 PM] Stefanita Rares Dumitrescu: ce-am facut
    [6:18:18 PM] Stefanita Rares Dumitrescu: :)))
    [6:18:20 PM] Stefanita Rares Dumitrescu: i dont get it
    [6:18:23 PM] Stefanita Rares Dumitrescu: ce pe dinafara is
    [6:18:45 PM] Stefanita Rares Dumitrescu: de cand fac astia versuri pe-aici tinand cont ca tot se caca pe ei de mici
    [6:19:38 PM] Stefanita Rares Dumitrescu: ce pula mea asa am ajuns te uiti pe net sa cauti un raspuns?
    [6:20:12 PM] Stefanita Rares Dumitrescu: am ochiu bun inca desi tu crezi altfel dar tot ce conteaza pentru mine e ca esti foarte mititel
    [6:20:32 PM] Stefanita Rares Dumitrescu: pula mea nu tre sa dau pe google sa fac rime, beau un ceai, trag o tigare si tot iese bine
    [6:20:58 PM] Mio: rime nu ai
    [6:20:58 PM] Mio: ?
    [6:21:15 PM] Stefanita Rares Dumitrescu: nush frate atata pot
    [6:21:18 PM] Stefanita Rares Dumitrescu: asa din voleu
    [6:21:23 PM] Stefanita Rares Dumitrescu: nu is mega creativ
    [6:21:26 PM] Stefanita Rares Dumitrescu: da e live
    [6:21:48 PM] Andrei: bai eminemilor
    [6:22:01 PM] Andrei: ce-i cu battle-ul asta
    [6:22:21 PM] Radu: :))))

    [6:23:04 PM] Stefanita Rares Dumitrescu: pai vad ca se incoarda radu cu scobee aici cu versuri date de pe google
    [6:23:04 PM] Stefanita Rares Dumitrescu: da nu stiu ca daca vrei sa te arzi cu mine o sa intri in trouble
    [6:23:10 PM] Radu: 4 de linii fratie, sa mor, puneam de-o melodie. ba chiar faceam doua. ce-atata vorbarie?
    [6:23:38 PM] Andrei: :))

    [6:26:32 PM] Radu: nu iau de bun rahatul mancat de tine, ca n-ai destula vointa si nici minte sa se schimbe
    [6:27:30 PM] Stefanita Rares Dumitrescu: cine pula mea sa se schimbe nu ai nici un sens, ti-e creierul corodat de la atata smack in the face?
    [6:28:19 PM] Andrei: m-as baga si eu dar sunt pe telefon.
    doar recit. nu cant. ca sunt afon.
    spalam vase sa primim felatie.
    scobee? tu nu ai nicio reactie?
    [6:28:28 PM] Scobee: nu ma pot concentra
    [6:28:33 PM] Scobee: fac stuff pt sonia
    [6:28:36 PM] Radu: nu esti un mare papagal, esti un super baietash, daca intru peste tine-n casa zici ca ii superi pe rusi
    [6:29:24 PM] Radu: esti un papa lapta care papa cacat cu lingurita, nu mai vorbi ca ma doare scufita
    [6:29:26 PM] Radu: :))
    [6:29:34 PM] Scobee: vin cu rime ca baiatu, cand bag cod pana la 4, doaren pula de voi toti, fut la Sharon ca un bo$$
    [6:29:50 PM] Stefanita Rares Dumitrescu: te doare scufita de la pula din gura, da-o mai pe-o parte ca nu ai masura
    [6:30:20 PM] Stefanita Rares Dumitrescu: daca intri peste mine-n casa ai dat de dracu, te pun la orizontal, te fut in cur pana rup patu
    [6:30:37 PM] Radu: nu-i nimic nou, de lupti cu aproapele tau in loc sa lupti cu sharon si cu sistemul sau
    [6:30:48 PM] Stefanita Rares Dumitrescu: ba wait da suntem toti live acuma?
    [6:30:53 PM] Stefanita Rares Dumitrescu: nu mai da nimeni cu copy paste? :))
    [6:31:02 PM] Radu: eh pula, adaptam
    [6:31:02 PM] Radu: :))
    [6:31:28 PM] Stefanita Rares Dumitrescu: pula mea adaptezi dar cred ca pe bune daca vrei sa te iei in rime cu mine iti trebe o licenta de autotune
    [6:31:34 PM] Scobee: facem rime impreuna, bem numai bautura buna, suntem toti pe felie, bo$i pentru care ne stie

    Tags:

    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

    Tags:

    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 …

    Tags:

    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

    Enjoy!

    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 /
    
    
    
    Tags:

    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:

    NM_CONTROLLED=”no”

    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: , , , ,