Cisco VPN mit Windows 8: Error 442: Failed to enable virtual adapter
Der Cisco-VPN Client in der Version 5.0.0.05.0440 für Windows 8 verursacht bei mir folgendes Problem. Jedes mal wenn ich Username und Passwort eingeben sagt er (auf der Kommandozeile die vpnclient.exe)
Intializing the VPN connection Contacting the gateway xxx.xxx.xxx.xxx Authenticating user. Negotiating security policies Securing communiation channel Secure VPN Connection terminated locally by the Client Reason: Failed to enable Vitual Adapter
bzw. GUI gibt zurück:
Secure VPN Conection terminated locally by the Client Reason 442: Failed to enable Virtual Adapter Connection terminated on XYZ
Wobei XYZ für Datum und Länge steht.
Auch wenn diverse Rechenzentren von Universitäten was anderes erzählen... Der Fehler liegt dabei in der Registry und zwar genauer beim Schlüssel DisplayName unter HKEY_LOCAL_MASCHINE\SYSTEM\CurrentControlSet\Serices\CVirtA. Der enthält die Zeichenkette @oem4.inf,%CVirtA_Desc%;, welche man einfach rauslöschen kann. So steht da einfach nur noch Cisco Systems VPN Adapter for 64-bit Windows. Bei der 32-bit Version steht einfach nichts dahinter(also keine 32-bit!)
Um das zu automatisieren kann man .reg-Dateien schreiben in dem man mit regedit den Wert ändert, und dann mit Datei/Exportieren eine .reg-Datei erstellt. Die übernimmt allerdings alle Werte aus dem Unterordner. Mit seinem Lieblingseditor kann man nun einfach die restlichen Einträge aus der Datei löschen, so dass dort nur noch steht:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVirtA] "DisplayName"="Cisco Systems VPN Adapter for 64-bit Windows"
oder im Fall von 32-Bit Systemen:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVirtA] "DisplayName"="Cisco Systems VPN Adapter"
Hier findet ihr die beiden .reg-Dateien gezippt als Download:
Credits gehen an ITServiceDRoeding für sein YouTube Video.
Ausloggen über Konsolenbefehl bei Ubuntu
Letztens habe ich mich ein bisschen beim Wechsel der Windowmanager verdaddelt. Zum Glück konnte ich mich noch über SSH einloggen und kam dann mit dem folgenden Befehl zurück zur Anmeldung:
dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1
(Credits)
How to get facebook back online #facebookdown
Seems like facebook has some kind of DNS-Problem right now(#facebookdown). To fix this enter the facebook IPs in your hosts-file. To get them, have a look at your DNS Cache with a tool like dig(or use the ones I provide below).
Linux
repat@laptop:~$ dig facebook.com ; <<>> DiG 9.8.1-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11887 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;facebook.com. IN A ;; ANSWER SECTION: facebook.com. 6010 IN A 69.171.229.16 facebook.com. 6010 IN A 173.252.100.16 facebook.com. 6010 IN A 173.252.101.16 facebook.com. 6010 IN A 66.220.152.16 facebook.com. 6010 IN A 66.220.158.16 facebook.com. 6010 IN A 69.171.224.32
So just enter this into your /etc/hosts file:
#vi /etc/hosts
66.220.158.16 facebook.com 66.220.158.16 www.facebook.com
Windows
Windows has a similar file, which is located in %SystemRoot%\system32\drivers\etc\hosts. Where %SystemRoot% is your Windows directory, so most likely C:\Windows.
At least in Windows 7 the file is locked by the system, so unless you have notepad++, which doesn't care about all this, you have to open your explorer, go to C:\Windows\system32\, right-click notepad.exe and select "start with admin rights"(or something like that...). Then click File/open, go to C:\Windows\system32\drivers\etc and select "all files" on the right side(see screenshot). Then again open the file and enter the following:
66.220.158.16 facebook.com 66.220.158.16 www.facebook.com
MacOS
1. Click on the looking glass icon in the top right corner of the screen
2. Type "Terminal" and press Enter, a new app called "Terminal" will appear
3. Don't get confused by it, just follow the steps
4. Copy this text into your clipboard : echo "173.252.101.16 www.facebook.com" | sudo tee -a /etc/hosts
5. Paste it into the "Terminal" window and press Enter
6. You will be prompted to enter your password (it will not show up on the screen, don't worry about it), press Enter again when you finished typing your password.
7. The line "173.252.101.16 www.facebook.com" will appear on the screen.
8. Done!
Bildschirm an- und ausschalten mit xset dpms
Bei meinem Raspberry Pi wollte ich über Nacht den Bildschirm ausschalten bzw. eigentlich in den Standby Modus bringen, um Strom zu sparen. Das mit dem Standby hat nicht geklappt aber jetzt ist der Bildschirm zumindest schonmal schwarz. Das hat bei meinem 40''-Bildschirm etwa einen Unterschied von 30Watt gemacht. Die beiden Befehle sind:
xset dpms force off
und
xset s reset
Erklärung:
- xset setzt das Display Power Management Signaling auf off. Ein entsprechender Befehl mit on statt off hat bei mir nicht funktioniert.
- das s hinter xset steht für screensaver (s. auch xset --help). Wenn dieser resetet wird, sieht man wieder ein Bild.
Credits und Dank gehen wieder einmal an Christoph von linuxundich.de
Midori Fullscreen und Reload im Sekundenintervall
Ich wollte den Raspberry Pi benutzen, um auf einem großen Bildschirm eine Website mit Informationen darzustellen. Da doch hin und wieder mal die Internetverbindung verschwindet, war es mir wichtig einen Reload jede Stunde oder so zu haben. Bei Firefox könnte man jetzt ein Reload Plugin nehmen, der minimalistische Standard-Browser unter dem Debian Derivat Raspian - Midori - unterstützt aber natürlich keine Plugins. Also habe ich ein kleines Skript geschrieben, welches in einer Endlosschleife ein sleep 3600 (3600 Sekunden = 1 Stunde) ausführt und dann mit dem Kommandozeilen-Parameter -e Reload einen Reload in dem schon geöffneten Midori macht. Außerdem möchte ich das Skript per SSH starten, also muss noch der Display :0 angegeben werden, s. Programme über SSH auf Display :0 starten. Für einen Fullscreen benutze ich schon beim ersten Start in Zeile 3 -e Fullscreen. Eine erste Idee, einfach einen Refresh über eine statische HTML Seite mit iframes zu machen, habe ich verworfen, weil es blöd aussah. Die Parameter -i <Sekunden> -a <Website> haben dazu geführt, dass oben die Adressleiste wieder sichtbar wurd.e. Weitere interessante Funktionen findet man mit midori --help-execute.
#!/bin/bash export DISPLAY=:0 midori -e Fullscreen --display=:0 & while [ TRUE ]; do sleep 3600 midori -e Reload done
Credits go to W. H. Heydt at raspberrypi.org Forum
Sound beim Raspberry Pi über Klinke
Damit bei eingesteckten HDMI-Kabel der Sound trotzdem über Klinke (der normale Kopfhöreranschluß) und nicht über das HDMI-Kabel über den TV kommt, muss man die Priorität des Audioausgabegeräts mit folgendem Befehl umstellen:
sudo amixer cset numid=3 1
Credits go to Johannes
prosody 0.8.2. still waiting
I tried to start prosody with user-privileges (with user/group prosody) but I kept getting this message from prosodyctl start:
Still waiting... Proody is still not running. Please give it some time or check your log files for errors.
But there were no errors in the log-file. If I deleted the log-file nothing was created again. I tried giving all the prosody folders 777 rights and chown'd them to the prosody-user, still...same error. I then went to the Prosody MUC. Once again, Zash helped me to isolate the error: the pid-file could not be written by the user. So I just changed the line
pidfile="/var/run/prosody.pid"
to:
pidfile="/home/prosody/prosody.pid"
Pruefen ob ein Computer online ist mit ping und perl
Ich habe bei der Arbeit ein kleines Perl-Skript geschrieben, welches prüfen sollte, ob bestimmte Computer in bestimmten Räumen(also IP-Ranges) noch online sind oder schon automatisch ausgestellt wurden. Dieses Skript sendet ein Paket über ping und guckt dann, ob es ein packetloss gibt. Im Grunde wäre das in der Bash besser gewesen, aber so kann man das, wenn man es ein bisschen anpasst, auch unter anderen OS verwenden.
Code
# The string containsPacketLoss is searching for
$packetloss = "100% packet loss";
# Init
$returnval = "";
print "\nCheck if Computers are online...\n";
# Scan IP-Range
for (my $i = 1; $i <=255; $i++) {
# c = one package, w = deadline, q = quiet
$ipcmd = "ping -c1 -q -w1 169.254.1." . $i;
# execute and retreive output
$returnval = `$ipcmd`;
if (containsPacketLoss() == 0) {
# output
print "Computer with IP 169.254.1." . $i . "is still online.\n";
# write log file
system("echo Computer with IP 169.254.1.". $i . localtime(time) . " ONLINE >> /home/user/log");
}
}
sub containsPacketLoss(){
# check by RegEx if the string specified above is in the returnvalue
# of the ping command
if ($returnval =~ m/$packetloss/ ){
return 1;
}
return 0;
}
Download





