Friday, August 31, 2007

FreeBSD soundcard config

Uzun zamandir fellik fellik aradigim snd_hda modulunu ve gerekli config belgisini buldum..

Ariff isimli bir kardesimiz, canimiz, cigerimiz linuxteki snd_hda intel ALC880 modulunu FreeBSD portolayini gerceklestirmis.Bunlar icin su linkteki aciklamalari takip edip;bu linkteki dosyalardan faydalanabilirsiniz..

FreeBSD mysql config

FreeBSD de mysql conf biraz daha farkli.FreeBSD guvenlik uygulamalari dogrultusunda portlarindan kurdugunuz mysqlclient mysql kullanicisindan baskasiyla acmaniza izin vermiyor.Aslina bakarsaniz dogru olanda bu.Bu durumda linuxten farkli olarak birkac ek ayarlama yapmak gerekiyor.Portlardan mysql kurulumundan sonra linuxte oldugu gibi;

# mysql_install_db

komutunu girerek default mysql db dosyalari olusturuyoruz.Daha sonra FreeBSD de default mysql dizini olan /var/db/mysql dizinini mysql kullanicisi erisebilecek sekilde;

# chown -R mysql /var/db/mysql/

ve

# chgrp -R mysql /var/db/mysql/

komutlarini girdikten sonra geriye sadece mysqld calistirmak kaliyor;

# /usr/local/bin/mysqld_safe -user=mysql &

boylece mysql hazir.Her sistem acilisinda mysqli baslatmak icin

# echo 'mysql_enable="YES"' >> /etc/rc.conf

komutundan yaralanilir.Istege bagli olarak mysql root passwordu ayni linuxte oldugu gibi degistirilir..

Saturday, August 25, 2007

Mysql config


After installing mysql on your linux box there is some configuration that you should make;

1-> Assign a password for "root" account.Give mysql that commands:

mysql> UPDATE user
-> SET password=password("newpassword")
-> WHERE user="root";

The new root passwd is now "newpassword"

2-> Create a new database and assign all options on specific user:
imagine that you need to create a new database for your holy music player amarok, and you wanna use mysql as database..

mysql> create database amarok;
mysql> create user amarokuser;
mysql> GRANT ALL PRIVILEGES ON amarok.* TO 'amarokuser'@'localhost'
>IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> flush privileges;

That's all.You can use amarok database with amarokuser in amarok application.. cool ha?

Saturday, June 30, 2007

wireless networking basics

A little info about wireless networking;

ESSID : The Extended Service Set Identification (ESSID) simpliest way is the name of the Access Point.You see ESSID as the string when you search for the AP

BSSID : MAC address of AP.Its an id of AP.

Wireless Channels : Wireless AP and clients talks to each other by using 2.4-2.5 ghz radio signals by default.Its a standard at IEEE 802.11b/g.

Wireless Security Models : To provide security between access nodes, IEEE defined 2 ways of method : WEP and WPA.WPA is stronger than WEP and support 128 bit authentication keys.WEP is also easy to recover password by using programs such as aircack or airsnort etc..

This things generally happens when a wireless client(notebook etc) attemps to connect to a Open Security based(no key authentication) AP :
1-> Client sends a request to AP.
2-> The access point authenticates the client.
3-> Client connects to AP.




But if AP protected by a WEP connection turns this :



The following steps occur when two devices use Shared Key(WEP) Authentication:

1. The client sends an authentication request to the access point.

2. The access point sends challenge text to the station.

3. The station uses its configured 64-bit or 128-bit default key to encrypt the challenge text, and it sends the encrypted text to the access point.

4. The access point decrypts the encrypted text using its configured WEP key that corresponds to the station's default key. The access point compares the decrypted text with the original challenge text. If the decrypted text matches the original challenge text, then the access point and the station share the same WEP key, and the access point authenticates the station.Because of that it calls Shared Key.

5. The client connects to the network.

There is two way of key generation model at WEP : 64 bits or 128 bits.24 of 64 bits is using for a 40 bit key generation.That means only 5 character key (40bits) can be generated by 64 bit authentication...

WPA Based wifi Security

WPA security model highly increases wireless security against WEP.Unlikely WEP, TKIP method required at WPA security model.TKIP is the new encrypt algorithm stronger than WEP.At one day you can sniff and crack WEP key.But WPA requires to collect more than one million package and "handshakes" between client and AP.

that link may work :p

Saturday, May 12, 2007

Slackware xorg.conf

Slackware de xorgu en kolay configure etmenin bir diger yoluda, donaniminizi iyi taniyan bir dagitim bulup(Pardus,Knoppix vb) bu dagitimlarin olusturdugu xorg.conf dosyasini direkt olarak slackware e tasimaktir.Daha sonra xorgun talep ettigi modulleri iceren bir kernel derlenerek
daha once kullandiginiz dagitim seviyesinde xorgu kullanabilirsiniz.Bu yontem baya bi kopya icermekte olup yok ben bunlarla ugrasmayi seviyorum diyenlere tavsiye edilmez :P..

Monday, February 26, 2007

Kaybolan root passwordlari ve cozumu..

Unix-like diye nitelendirdigimiz isletim sistemlerini kullananlar bilirler, eger root passwordunuzu yitirmisseniz , yada sizinde benim gibi canı sıkıldıgında root passwordunuzu degistiren saklaban* arkadaslariniz varsa(Fethi ve Orhana opucukler :D) artik o sistem uzerinde pekte bir gucunuz kalmaz hatta hicbirsey yapamazsiniz.Bu durumdan kurtulmak icin kullanabileceginiz cesitli yontemler var;
Herseyden once belirtmeliyimki Unix ve turevlerinde passwordlardan sorumlu dosya :/etc/shadow dosyasidir.Bu dosyayi actiginizda soyle birseyle karsilasirsiniz :

root:$1$JvYQL23Up$k2aJ6wD47tAT1nIYRNkAO1:13570:0:::::
bin:*:9797:0:::::
daemon:*:9797:0:::::
adm:*:9797:0:::::
sync:*:9797:0:::::
shutdown:*:9797:0:::::
halt:*:9797:0:::::
mail:*:9797:0:::::
news:*:9797:0:::::
operator:*:9797:0:::::
man:*:9797:0:::::
postmaster:*:9797:0:::::
dialout:*:13094:0:99999:7:::
ftp:*:9797:0:::::
named:*:13094:0:99999:7:::
mysql:*:13094:0:99999:7:::
postgres:*:13094:0:99999:7:::
apache:*:13094:0:99999:7:::
dovecot:*:13094:0:99999:7:::
dbus:*:13094:0:99999:7:::
hal:*:13094:0:99999:7:::
polkit:*:13094:0:99999:7:::
postfix:*:13094:0:99999:7:::
smmsp:*:13094:0:99999:7:::
firebird:*:13094:0:99999:7:::
dhcp:*:13094:0:99999:7:::
ldap:*:13094:0:99999:7:::
clamav:*:13094:0:99999:7:::
ntlmaps:*:13094:0:99999:7:::
ntp:*:13094:0:99999:7:::
tss:*:13094:0:99999:7:::
pnp:*:13094:0:99999:7:::
slack:$1$31141276$uaXFYNdmdEn12qN2OA3aD1:13094:0:99999:7:::
nobody:*:9797:0:::::


Bu dosyada suanda slack ve tabiki root kullanicilari var.
Ornegin root kullanicisinin passwd sinin sifrelenmis halidir :

root:$1$JvYQL23Up$k2aJ6wD47tAT1nIYRNkAO1:13570:0:::::

burada ki dizini su sekle donusturebiliriz :
root::0:0:root:/:/bin/sh

bu sekilde root passwd unu sifirladik..bundan sonra passwd a gerek kalmadan sisteme girebiliriz

Bir diger secenek ise eger elinizde baska sahdow dosyalari varsa (ornegin sistemde baska linux-unix sistemler varsa yada knoppix benzeri baska bir livecd ile) root passwd u olusturarak elde edilen shadow
dosyasini ozgun shadow dosyasi ile degistirebilirsiniz.Boylece diger sistemde gecerli olan passwd ler
artik yeni sistemdede gecerlidir.Herkese saglam passwdlar kazasiz belasiz gunler efendim..

Thursday, February 22, 2007

Intel 915GM ye ozel ekran karti ayarlamasi

Eger sizinde 915 Intel chipsetli bir laptopunuz var, 15.4" inch bir monitorunuz var ve ekran cozunurlugunu 1280x800 'e ayarlayamiyorsaniz 915resolution adli program tam size gore..programin kullanimi basit..
program temel olarak sistemin tanimadigi ekran kartinin biosunu sisteme tanitmaya yariyor..boylece monitorun olmasi gereken cozunurluge geciriyor..kullanimi su sekilde efendim:

>Temel olarak program X acilmadan once baslamali o yuzden programin acilis scriptini
(dagitima gore degisiyor ,rc.local-local.start gibi isimleri olabilir) Slackware 'de varsayilan acilis scripti olan cd /etc/rc.d/rc.local ( pardus te ise /etc/conf.d/local.start )scripti su sekilde duzenlenmelidir:

#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here. Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

if [ -x /bin/915resolution ]; then
exec /bin/915resolution -l 58 1280 800 32
fi

Efendim tum bu ayarlari yaptiktan sonra Slackware imiz 1280x800 ekranmodunda ve 32 bit destekli olaak acilmasi lazim..yok eger genede olmadi derseniz scripti tekrar gozden gecirin..genede olmadi derseniz masaustunde saga tiklatip Configure Desktop seceneginden ekran cozunurlugu kismini kurcalayin-cozunurlugu degistirip tekrar eski haline getirin ,bana bir keresinde olmustu..-tum bu kontrollerden sonra olmasi lazim..yok olmadi derseniz su python scripti isinizi gormesi lazim(Pardus icin):


#!/usr/bin/python
#-*-coding:utf8 -*-

# face the reality

import re
import os


def get915():
print ">installing.."
os.system("pisi -y it 915resolution")
print ">installed now configuring.."


def change():
conf = open("/etc/conf.d/local.start","a") # open file ro
print "file opened.."

conf.writelines("\nif [ -x /usr/bin/915resolution ]; then\n" \
"\texec /usr/bin/915resolution 58 1280 800 32\n" \
"fi\n");

def changeMod():
os.system("chmod +x /etc/conf.d/local.start")



get915()
change()
changeMod()
print ">done!"



ooldu o zaman

Registred Linux User

Registred Linux User

HitCounter