With this script you can parse the postfix databases / lookuptables which are in berkley database format.
WeiterlesenKategorie: Howtos & more …
E-Mail Aliase und Domains aus Plesk Datenbank exportieren
Das Skript verwende ich um aus der Plesk Datenbank alle gültigen E-Mail Adressen für einen Frondend Mailserver zu exportieren.
WeiterlesenCheck_MK: TG-Notify – Telegram Notification Bot with Callback for ACK & Downtime
TG-Notify ist eine von mir geschriebene Erweiterung für Check_MK welche Notifications über Telegram ermöglicht und über Callback Acknowledge und Downtimes setzen kann für Hosts/Services. Sourcecode: https://github.com/lanbugs/tg-notify Status/ Version: 0.1 beta Download als MKP: folgt Lizenz: GPLv2 Vorteile: Telegram ist kostenlos Telegram ist für alle gänigen Mobile und PC OS verfügbar […]
WeiterlesenCommandline Tool for exporting Cisco hardware inventory via SNMP
This tool exports every hardware asset from an Cisco device with a serial number. You can export the list as table or CSV. Download: https://gist.github.com/lanbugs/4dbed5e0e8a7d5b6d29c4ea9b9e93bb2 >python cisco_inventory.py -h usage: cisco_inventory.py [-h] -H HOST -v SNMP_VERSION [-C SNMP_COMMUNITY] [-u SNMP_USER] [-A SNMP_AUTH] [-a SNMP_AUTH_METHOD] [-X SNMP_PRIVACY] [-x SNMP_PRIVACY_METHOD] [-L SNMP_SECURITY] [–csv] Cisco […]
WeiterlesenCommandline Tool to export current registered users at APs from an Cisco Wireless LAN Controller (WLC)
This tool exports all current clients on all APs assigned to the WLC. You can export as CSV or as table. Download: https://gist.github.com/lanbugs/6dc874ad0736424c5c7808f01ec78f96 $ python cisco_ap_clients_grabber.py -h usage: cisco_ap_clients_grabber.py [-h] -H HOST -v SNMP_VERSION [-C SNMP_COMMUNITY] [-u SNMP_USER] [-A SNMP_AUTH] [-a SNMP_AUTH_METHOD] [-X SNMP_PRIVACY] [-x SNMP_PRIVACY_METHOD] [-L SNMP_SECURITY] [–csv] Cisco AP […]
WeiterlesenCLI Tool – Export AP inventory from an Cisco Wireless LAN Controller (WLC)
This tool exports the complete AP inventory from an Cisco WLC. You can create an CSV export or an table. Download: https://gist.github.com/lanbugs/e86042c0b2afaf7166637a9aa9711cb6 $ python cisco_wlc_ap_grabber.py -h usage: cisco_wlc_ap_grabber.py [-h] -H HOST -v SNMP_VERSION [-C SNMP_COMMUNITY] [-u SNMP_USER] [-A SNMP_AUTH] [-a SNMP_AUTH_METHOD] [-X SNMP_PRIVACY] [-x SNMP_PRIVACY_METHOD] [-L SNMP_SECURITY] [–csv] Cisco AP WLC […]
WeiterlesenPowerDNS MongoDB Backend
This a pipe backend for PowerDNS to MongoDB written in Python. Requirements pymongo python library powerdns min. version 4.x The MongoDB schema (for example DB: dns / Collection: records) For SOA records: { „name“:“example.org“, „type“:“SOA“, „content“:““, „ttl“: 300, „primary“: „ns1.example.org“, „mail“: „admin.example.org“, „serial“: 2018030311, „refresh“: 86400, „retry“: 7200, „expire“: 3600000, […]
WeiterlesenFlask, uWSGI und Nginx auf Ubuntu 16.04
– Kurze Zusammenfassung, ausführlich siehe Quelle am Ende des Artikels – Python Virtual Environment aufsetzen pip install virtualenv virtualenv projekt source projekt/bin/activate pip install uwsgi flask Mini Flask Applikation projekt.py from flask import Flask app = Flask(__name__) @app.route(„/“) def hello(): return „Hello world!“ WSGI Startfile wsgi.py from projekt import app […]
WeiterlesenMongoDB Authentication aktivieren
Per Default ist bei einer MongoDB Instanz keine Authentication aktiviert. Hier der kurze Weg. Admin Account anlegen devusr@testsystem:~# mongo MongoDB shell version v3.6.5 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.6.5 > use admin switched to db admin > db.createUser({user: „admin“, pwd: „geheimes_passwort“, roles: [{ role: „root“, db: „admin“ }]}) Successfully […]
WeiterlesenMongoDB und Python
Ein paar Notizen zu Python und MongoDB 🙂 MongoDB ist eine NoSQL Datenbank, weitere Infos -> Wikipedia 🙂 Aktuelle MongoDB Version installieren (auf Ubuntu 16.04) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 echo „deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse“ | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list apt install apt-transport-https apt update apt-get […]
WeiterlesenPasswort Hashing in Python
Hier die einfachste Variante um in sicheres Passwort Hashing in Python umzusetzen. Dazu wird die passlib verwendet. Diese kann per pip installiert werden, passlib ist für Python 2.x und 3.x kompatibel. pip install passlib Passwort hashen: >>> # passlib laden >>> from passlib.hash import pbkdf2_sha256 >>> >>> # das passwort […]
WeiterlesenKein Platz mehr auf der /boot Partition in Ubuntu / Debian
Per Default ist die Boot Partition ca. 500M groß, da sich hier durch die Updates gerne alte Kernel ansammeln ist es ratsam zwischendurch aufzuräumen. Beispiel einer abgebrochenen Installation, Meldung ist „No space left on device“ linux-image-4.4.0-116-generic (4.4.0-116.140) wird eingerichtet … Running depmod. update-initramfs: deferring update (hook will be called later) […]
WeiterlesenFast rsync over ssh
I have found a nice help for fast rsync transfers over ssh. You can reach 40MB/s on gigabit network, depends on disk speed, SSD are faster. rsync -aHAXxv –numeric-ids –delete –progress -e „ssh -T -c arcfour -o Compression=no -x“ user@<source>:<source_dir> <dest_dir> More details & source: https://gist.github.com/KartikTalwar/4393116
WeiterlesenOutlook 2016 issues with many mailboxes and many folders
I had a huge problem at one of my clients. He has an Exchange 2016 CU8 with Windows 10 Clients and Outlook 2016 Build 8829 click-to-run. The customer has in total 20 mailboxes and all coworkers (5) in most cases have full access to each other. Some of the users […]
WeiterlesenKeeWeb: Self-hosted password manager with apache2
Add Authentication First of all you’ll need to setup a .htpasswd file. To do so type in the following: sudo htpasswd -c /etc/apache2/.htpasswd username To use the authentication you can add the following to your VHost configuration: <Location „/“> AuthType „Basic“ AuthName „KeeWeb“ AuthBasicProvider file AuthUserFile „/etc/apache2/.htpasswd“ Require valid-user </Location> […]
WeiterlesenAnsible: Template Engine nutzen um Cisco Konfigurationen zu erzeugen
Ansible verwendet als Template Engine Jinja2. Als Beispiel wird für einen Switch die Radius Konfiguration erzeugt. Man kann direkt vom Template aus die Konfiguration auf ein Gerät fallen lassen oder so wie in diesem Fall einfach als File speichern. Eine ausführliche Anleitung was man alles mit der Jinja2 Template Engine […]
WeiterlesenAnsible: CLI Kommandos auf Cisco Devices ausführen und Ausgaben speichern
Beispiel Playbook exec_command.yaml: — – hosts: switch1 connection: local gather_facts: False vars: cli: host: „{{ inventory_hostname }}“ username: „{{ ansible_user }}“ password: „{{ ansible_ssh_pass }}“ tasks: – name: Call show inventory ios_command: commands: show inventory provider: „{{ cli }}“ register: output – name: Store output to file copy: content=“{{ output.stdout[0] […]
WeiterlesenAnsible: Cisco Netzwerkautomatisierung mit Ansible – Erste Schritte
Ich habe kürzlich Angefangen meine ersten Gehversuche mit Ansible zu machen. Ziel ist unteranderem meine Linux Maschinen zu managen als auch Cisco Geräte. Hier meine ersten Erfahrungen mit Ansible. Was ist der Vorteil von Ansible? Opensource reichhaltiges Plugin Angebot (Ansible Galaxy) viele Artikel & Tipps im Internet, kein Nischenprodukt es […]
WeiterlesenPerformance Probleme auf einem Linux System ermitteln
Aktuell habe ich auf einem meiner virtuellen Server Probleme mit der Performance, ein Blick in top offenbart das auf einer CPU 100% Waiting ist, Hintergrund war das der Provider einen ZFS scrub auf dem Host laufen ließ was die Disk Performance in den Keller gezogen hat. Ich nehme das zum […]
WeiterlesenDefekten GRUB Bootloader reparieren
Defekten Rechner mit Knoppix oder der systemrescuecd starten, mit fdisk -l oder parted -l kann man sich alle Partitionen anzeigen lassen. Je nach Installation ist die Bootpartition einzeln z.B. bei einem LVM Setup oder in einer Partition. Um per Chroot in die Installation des Rechners zu wechseln müssen die Partitionen […]
Weiterlesen