Keyboard Layout wechseln
Systemrescuecd:
loadkeys /usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.map
Debian:
dpkg-reconfigure keyboard-configuration
loadkeys en
megacli unter debian x64
Das gestaltet sich leider nicht so einfach bei Debian.
Denn megacli ist nur als rpm - Paket verfügbar.
Es läuft nun aber dank alien auf dem Server.
Leider allerdings nicht ganz perfekt, aber ich kann Raid-Daten auslesen.
Vorgegangen bin ich wie folgt:
apt-get install alien
MegaCli downloaden:
http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip
entpacken, anschließend gibt es einen LINUX Ordner.
Dort gibt es wieder ein Zip, auch dieses mit unzip entpacken.
In den Ordner wechseln und dort:
alien Lib_Utils-1.00-09.noarch.rpm
dpkg -i lib-utils_1.00-10_all.deb
alien MegaCli-8.02.16-1.i386.rpm
Dieses bricht bei x64 Systemen ab, da das Paket eigentlich für i386 ist.
Anschließend können sie allerdings über:
/usr/src/MegaCli-8.02.16/opt/MegaRAID/MegaCli/MegaCli
das Tool ganz normal ausführen.
z.B.:
/usr/src/MegaCli-8.02.16/opt/MegaRAID/MegaCli/MegaCli -AdpAllInfo -a0
Getting the last friday before a given date
Well.. this works with any other day of the week as well
/**
* Returns the last friday before the given date. If the given date is already a friday, the given
* date will be returned.
* @param date the date you want the last friday before of
* @return the last friday before the given date
*/
private static Date getLastFriday(Date date) {
// startDate is the date given, which is wrong because we need the last friday before this date
Calendar startDate = Calendar.getInstance();
startDate.setTime(date);
// if the start date is already a friday, it is not wrong at all and we can return it
if (startDate.get(Calendar.DAY_OF_WEEK) == 6) {
return startDate.getTime();
}
// create new Calendar instance so no one gets confused, this one will hold the date we are looking for
Calendar lastFriday = startDate;
// calculate the last friday coming just before the given date
lastFriday.add(Calendar.DAY_OF_WEEK, -(startDate.get(Calendar.DAY_OF_WEEK) % 7 + 1));
return lastFriday.getTime();
}
Plesk mit multiplen PHP Versionen als fastcgi
In Plesk kann standardmäßig nicht zwischen verschiedenen PHP-Versionen geswitcht werden. Falls die Kunden oder User aber mit der alten 5.2er oder der standard-Version ohne einem bestimmten Modul etc. nicht zufrieden sind, kann man das folgendermaßen lösen:
1. aktuelle PHP-Version von Hand kompiliert und mit prefix Pfaden installiert (siehe [[php|PHP]])
2. php-cgi aus dem Prefix-Pfad des kompilierten PHPs aus /bin nach /usr/bin kopieren (anders nennen z.B. php53-cgi)
confixx ssl fehler
"SSL Zertifikat und Private Key scheinen nicht zusammenzugehören."
- Key ist evtl. mit Passwort verschlüsselt oder Bug:
- Bug in Confixx /var/www/confixx/html/reseller/kunden_ssl_aktivieren.php Zeilen 55-62
mysql root pw aendern
Verdammte Axt, schon wieder das root-pw für mysql vergessen! Wem ist das noch nicht passiert?
Lösung:
- Log on to your system as the Unix user that the mysqld server runs as (for example,
mysql). - Locate the
.pidfile that contains the server's process ID. The exact location and name of this file depend on your distribution, host name, and configuration. Common locations are/var/lib/mysql/,/var/run/mysqld/, and/usr/local/mysql/data/. Generally, the file name has an extension of.pidand begins with eithermysqldor your system's host name.You can stop the MySQL server by sending a normalkill(notkill -9) to the mysqld process, using the path name of the.pidfile in the following command:shell>
kill `cat /mysql-data-directory/host_name.pid`Use backticks (not forward quotation marks) with the
catcommand. These cause the output ofcatto be substituted into thekillcommand.
Man kann auch einfach den mysql-Dienst über das init-Script beenden!
- Create a text file containing the following statements. Replace the password with the password that you want to use.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;Write the
UPDATEandFLUSHstatements each on a single line. TheUPDATEstatement resets the password for allrootaccounts, and theFLUSHstatement tells the server to reload the grant tables into memory so that it notices the password change. - Save the file. For this example, the file will be named
/home/me/mysql-init. The file contains the password, so it should not be saved where it can be read by other users. If you are not logged in asmysql(the user the server runs as), make sure that the file has permissions that permitmysqlto read it. - Start the MySQL server with the special
--init-fileoption:shell>
mysqld_safe --init-file=/home/me/mysql-init &The server executes the contents of the file named by the
--init-fileoption at startup, changing eachrootaccount password.
THX @ Mysql-Doku!
Windows Autopwn
Hacking light.
So lautet das Motto von Windows Autopwn. Die Sammlung von Exploits gegen Windows Rechner setzt auf Metasploit auf.
Schaut es euch selbst einfach an.. Heftig!
Hier noch ein interessanter Heise Beitrag, welcher die Gefahr und Möglichkeiten eines solchen Toolkits erläutert.
http://www.heise.de/security/artikel/Metasploit-Exploits-fuer-alle-270766.html
Was lernen wir daraus?
Wenn man Windows im Einsatz hat, IMMER sofort alle Updates einspielen und vorallem eine Firewall benutzen!!
Wobei sich letzteres bei den Meisten sowieso gegessen hat, Dank DSL-Routern mit NAT.
Flood legt Blog lahm
Als ich gerade meinen Blog checken wollte, fällt mir auf, dass dieser nicht mehr erreichbar ist. Hmm merkwürdig..
Also sofort ab auf den Server.
Nach einem netstat -tpen war alles klar... DOS (Denial of Service) auf Port 80
Da legt also einer gezielt meinen Blog lahm, immer die gleiche IP.
Gleich mal whois auf die IP gemacht, deutscher ISP.
IP geblockt über IP-Tables, Mail an abuse ging auch raus. Mein neuer Server sollte wohl doch etwas schneller an den Start gehen!!
Und jetzt weiß ich auch wer es war und mit was
Mails kommen nicht mehr an – procmail in log
Falls Ihr procmail im Einsatz habt und Mails nicht mehr ankommen, dann checkt doch mal die /etc/procmailrc
Ist diese kaputt, könnt ihr in den maillogs zu einer mail immer als letztes sehen, dass die mail an procmail übergeben wurde.
Danach ist allerdings Schluss.
Es geht nichts mehr weiter, weil die Config Datei von procmail broken ist!