1) install dsniff
2) macof -d 255.255.255.255 -i eth0 -n 1005000
and your switch will be stupid (hub)/
sudo su
mkdir -p /data/mysql
mv /var/lib/mysql/* /data/mysql
rm -rf /var/lib/mysql
ln -s /data/mysql /var/lib/mysql
chown -R mysql.mysql /data/mysql /var/lib/mysql
edit /etc/mysql/conf.d/datadir.cnf // create this file
[mysqld]
datadir= /data/mysql
edit /etc/apparmor.d/usr.sbin.mysqld
after
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
add
/data/mysql/ r,
/data/mysql/** rwk,
/etc/init.d/apparmor reload
/etc/init.d/mysql restart
Example:
I have database «WAR» with two tables:
a_table
| id | guildId | guildName |
| 0 | 100500 | RealGods |
| 1 | 22115 | BestPlayers |
| ... | ... | ... |
b_table where fields «attackerGuild» and «defenderGuild» are foreign keys from a_table.
| id | attackerGuild | defenderGuild |
| 0 | 1 | 0 |
| 1 | 5 | 6 |
| 2 | ... | ... |
I want to make select and see guildId of attacker and defender.
select a."attackerGuild", b."guildId", a."defenderGuild", c."guildId" from «a_table» a, «b_table» b, «b_table» c where (a."attackerGuild" = b."id" and a."defenderGuild" = c."id");
Now i have table:
| acctackerGuild | guildId | defenderGuild | guildId |
| 1 | 22115 | 0 | 100500 |
| 5 | 33421 | 6 | 895656 |
| ... | ... | ... | ... |
aptitude install ksh gcc libpam0g-dev -y
wget http://motp.sourceforge.net/pam_mobile_otp-0.6.2.tgz
tar -zxf pam_mobile_otp-0.6.2.tgz
cd pam_mobile_otp-0.6.2
make && make install
wget http://downloads.sourceforge.net/project/pam-script/pam-script-1.1.5.tar.gz
cd pam-script
./configure && make && make install
wget http://motp.sourceforge.net/otpverify.sh
chmod +x otpverify.sh
wget http://motp.sourceforge.net/dictionary.motp
include this file to /etc/freeradius/dictionary
mkdir -p /var/motp/{cache,users}
chown -R freerad.freerad /var/motp
create file /etc/freeradius/modules/MOTP
MOTP {
wait = yes
program = «/path/to/otpverify.sh %{User-Name} %{User-Password} %{reply:Secret} %{reply:Pin} %{reply:Offset}»
input_pairs = request
output_pairs = reply
}
add to file /etc/freeradius/sited-enabled/default (or which do you use)
Auth-Type External {
MOTP
}
edit /etc/freeradius/users
DEFAULT Auth-Type := External
Fall-Through = Yes
yourlogin
Secret = e37629f6d057dcc5,
PIN = 1234,
Offset = 0
/etc/init.d/freeradius restart