- Starten mit SuperGrub
- sudo grub-install –root-directory=/ /dev/sda
Author: mario
Ubuntu WOL
Ubuntu Wake on LAN
1. If you havent already, go to your BIOS, and turn on WakeOnLAN (it varies, look for it.) If your network card is onboard, your set for step 2, otherwise there is probably a cable that should go from your network card to your motherboard, though this is not always the case.
2. Back in ubuntu, kubuntu, xubuntu, w/e, we now need to make a script that will run every time the computer is started, because this command only lasts until the computer is turned on again once.
2a. Find out what network device you want to have the computer wake-able from, usually all, which is just one. If you have more network devices in your system, 9 chances out of 10, you already know what they are called. You can NOT wake up a laptop or computer that is only connected via wireless with wake-on-lan, unless the bios has a method for this, this is very rare, and I do not garuntee this howto will work in such cases. In your terminal, type: Code:
ifconfig
You’ll get something like: (I have removed my mac address for security)
eth0 Link encap:Ethernet HWaddr 01:23:45:67:89:ab inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::215:f2ff:fe6f:3487/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:71495 errors:0 dropped:0 overruns:0 frame:0 TX packets:76190 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:23164212 (22.0 MiB) TX bytes:7625016 (7.2 MiB) Interrupt:217 Base address:0xd400 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1290 errors:0 dropped:0 overruns:0 frame:0 TX packets:1290 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:161182 (157.4 KiB) TX bytes:161182 (157.4 KiB)
So, I want this system to be wake-able from eth0.
2b. Now we create the script. Note: you must be an administrator on the system you are doing this to.
sudo -i
Enter your password at the prompt. Change to the startup script directory and start editing a new file:
cd /etc/init.d/ nano wakeonlanconfig
Paste, or type this into the file, replacing eth0 with your network device, repeat the ethtool line as many times for your devices before the exit line:
#!/bin/bash ethtool -s eth0 wol g exit
Set the permissions of the file:
chmod a+x wakeonlanconfig
Make the script run on startup:
update-rc.d -f wakeonlanconfig defaults
You should see something like:
Adding system startup for /etc/init.d/wakeonlanconfig ... /etc/rc0.d/K20wakeonlanconfig -> ../init.d/wakeonlanconfig /etc/rc1.d/K20wakeonlanconfig -> ../init.d/wakeonlanconfig /etc/rc6.d/K20wakeonlanconfig -> ../init.d/wakeonlanconfig /etc/rc2.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig /etc/rc3.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig /etc/rc4.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig /etc/rc5.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig
Now we finish by running it, and making sure there are no errors.
/etc/init.d/wakeonlanconfig
This should produce no output and put you right back at the prompt you started at.
3. Use it. you’ll need something to send wake-on-lan packets with, „wakeonlan“ is in the repos. And you’ll need the mac address of the system.
To get your MAC address, on the same system you just enabled WOL on, type: Code:
ifconfig | grep HW
its the thing that looks like 01:23:45:67:89:ab , write it down. turn off that system:
sudo halt
if your using wakeonlan from the repos, and you are on the same network as the computer your tying to wake up, replace 01:23:45:67:89:ab with your mac address and do, from another computer:
wakeonlan 01:23:45:67:89:ab
In MOST cases, you CAN SEND wake on lan packets from a wireless connected computer. If that doesnt work, its likely the port on the system your trying to wake up isnt the default (9), try 7, or if your BIOS settings or book told you one, use that one.
wakeonlan -p 7 01:23:45:67:89:ab
compile zlib 1.2.4 on 64 bit Windows command line
nmake -f win32\Makefile.msc
compile zlib 1.2.4 on Windows command line
cd contrib\masmx86 bld_ml32 cd ..\.. ML /coff /Zi /c contrib\masmx86\match686.asm NMAKE -f win32\Makefile.msc LOC="-D_CRT_SECURE_NO_DEPRECATE /wd4996 -DASMV" OBJA="match686.obj" MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2
remove /MACHINE:X86 from make files with php
I use PHP on the command line cause I know it the syntax better than any other scriting language and it works on linux and windows. This is about removing the x86 to be able to build apache in x64 (64 bit) on windows.
<?php $files=array( "srclib/apr/libapr.mak", "srclib/apr-iconv/build/modules.mk.win", "srclib/apr-iconv/libapriconv.mak", "srclib/apr-util/dbd/apr_dbd_freetds.mak", "srclib/apr-util/dbd/apr_dbd_mysql.mak", "srclib/apr-util/dbd/apr_dbd_odbc.mak", "srclib/apr-util/dbd/apr_dbd_oracle.mak", "srclib/apr-util/dbd/apr_dbd_pgsql.mak", "srclib/apr-util/dbd/apr_dbd_sqlite2.mak", "srclib/apr-util/dbd/apr_dbd_sqlite3.mak", "srclib/apr-util/dbm/apr_dbm_db.mak", "srclib/apr-util/dbm/apr_dbm_gdbm.mak", "srclib/apr-util/ldap/apr_ldap.mak", "srclib/apr-util/libaprutil.mak" ); foreach($files as $file){ if(file_exists($file)){ echo "Replace in: ". $file ."\n\r"; file_put_contents($file,str_ireplace(" /MACHINE:X86","",file_get_contents($file))); } else { echo "FAILED: ". $file ."\n\r"; } } ?>
Wir haben Mircrosoft unsere Seele verkauft
Wir haben alle unsere Seele an Microsoft verkauft … Ein MAC als
Arbeitsgerät einsetzen zu wollen ist Grund genug für ne fristlose
Kündigung!! Ich werd ja schon wegen meinem *privaten* iPhone gemobbt …
social engineering leicht gemacht mit dem MAC und einem USB Stick
Es ist in einer Firma in der die meisten einen MAC benutzen sehr leicht an Daten heranzukommen. Einfach mal dem Mac Kollegen den USB Stick für ausleihen. Wenn der jenige dann die Daten auf dem USB Stick löscht, aber den Mülleimer nicht leert, dann findet man später auf dem Windows / Linux PC, vorausgesetzt man lässt sich versteckte und Systemdateien anzeigen, auf dem USB Stick einen Ordner mit dem Namen .Trashes . Da vorneweg ein “.” ist, ist der Ordner auf dem MAC nicht zu sehen. Und genau in diesem Ordner finden man dann die gelöschten Daten ;-)
PHP age calculator / Alter berechnen
<?php /** * age_calculator() * * @param int $day DD * @param int $month MM * @param int $year YYYY * @return int $age years */ function age_calculator($day,$month,$year){ if(date("n") > $month){ $age = (date("Y") - $year); } elseif(date("n") == $month){ if(date("j") < $day){ $age = (date("Y") - $year) - 1; } else { $age = (date("Y") - $year); } } else { $age = (date("Y") - $year) - 1; } return $age; } ?>
Aufgeweckt vom ebedded linux
Eigentlich sollte man meinen, dass ein embedded linux leise bis ohne Geräusche arbeitet. So eigentlich auch der Fall bei mir. Ich hatte mir ein NSLU2 gekauft und dann die Firmware mit Debian geflasht, um ein vernünftiges Linux darauf zu haben, nicht die originale Firmware mit all den Einschränkungen. Die Installation hatte anders als im internet angegeben nicht 4 Stunden, sondern ganze 6 Stunden gedauert, trotz einer guten Internetverbindung und obwohl ich den Prozessor auf 266 MHz schon erhöht hatte, mittels Entfernen eines Widerstandes der die CPU nut ausbremst. Keine Ahnug warum Cisco Systems das gemacht hat. Da ich anstelle einer externen Festplatte einen 8 GB Flash USB Stick gewählt habe und der NSLI2 keinen Lüfter besitzt, ist gar nichts zu hören. Absolute Stille selbst bei Vollast.
Wie dem auch sei, heute bin ich mitten in der Nacht davon aufgewacht. Irgent etwas blickte sehr hell in meinem Zimmer. Zu nächst dachte ich es sei eine der Netzwerkkarten von den Computer, die eine Verbindung zum switch haben und wegen WOL immer aktiv sind, auch wenn die PCs ausgeschaltet sind. Das war es aber nicht. Die blaue Diode vom dem USB Stick am NSLU2 blickte unaufhörlich. Normalerweise blinkt die nur ganz selten, denn außer einem SSH server läuft nichts aus dem NSLU2. Ich habe dann das Gerät so gedreht, dass jene Diode nicht in in Richtung meines Bettes leuchtet und habe mich wieder hingelegt.
Heute morgen hat sich dann mein Verdacht bestätigt, warum da so viel Aktivität war. Da hat jemand 8 Stunden lang versucht sich auf dem SSH server einzuhacken. Naja die brute force methode klappt halt nicht, wenn root sich gar nicht einloggen kann und der einizige Benutzer, der sich einloggen kann keinen gewöhnlichen Usernamen hat. Aufgeweckt hat es mich trotzdem und das obwohl kein Mux von sich gibt.
Ich leite die mail einfach mal weiter …
Vor ein paar Wochen hat unsere Sekretärin eine kleine email mit den Bildern von der Weihnachtsfeier in Bitmap (*.bmp) Format bekommen. Alles in allem knapp 350 MB. Doch schon eine recht große email… aber da fing der Spaß aber erst richtig an. Sie hat dann die mail einfach mal an alle die bei der Weihnachtsfeier dabei waren die mail weitergeleitet mit dem ganzen Anhang. Auf einmal waren da so 6 GB mails auf dem mit 4 GB RAM bestückten email server. Der server meldete sich erst mal die nächsten 1,5 Stunden nicht mehr.
Auf die Idee zukommen die Dateien auf dem file server abzulegen ist die Sekretärin irgentwie nicht gekommen. Warum auch bei einer so kleinen mail… DAU!
Author Archive
Archives by Month:
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- August 2024
- April 2024
- January 2024
- December 2023
- November 2023
- July 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- October 2022
- September 2022
- August 2022
- July 2022
- May 2022
- March 2022
- February 2022
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- February 2021
- January 2021
- August 2020
- July 2020
- June 2020
- April 2020
- January 2020
- December 2019
- November 2019
- October 2019
- May 2019
- April 2019
- March 2019
- January 2019
- October 2018
- August 2018
- June 2018
- April 2018
- March 2018
- February 2018
- November 2017
- June 2017
- April 2017
- February 2017
- January 2017
- November 2016
- September 2016
- May 2016
- February 2016
- September 2015
- August 2015
- July 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- July 2014
- June 2014
- April 2014
- January 2014
- December 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009