Schlagwort-Archive: osx

OSX System Extensions auflisten

Um auf dem Mac eventuell problematische Kext-Dateien / Extensions zu finden ist folgender Befehl hilfreich

system_profiler SPExtensionsDataType | grep Rocha -B16

Das grep im Anschluss filtert die Ausgabe nach dem Author „Rocha“ und zeigt die 16 Linien vor der Fundstelle an, um das Kext genau zu identifizieren.

OSX: Iso aus Installations-DMG erstellen

[Lion]

Erst das DMG aus dem AppStore mounten, dann


$ hdiutil makehybrid -iso -hfs Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg -o OSX-10.8.iso

Quelle
https://j4zzcat.wordpress.com/2012/08/24/create-a-bootable-iso-image-for-mountain-lion/

[Sierra +] alternativ:
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
https://gist.github.com/julianxhokaxhiu/6ed6853f3223d0dd5fdffc4799b3a877

HowTo Fix Mosh on OSX

Wenn keine Verbindung zum Ziel-Rechner aufgebaut wird bzw. die Fehlermeldung erscheint das „mosh-server“ wohl nicht installiert ist, hier ist die Lösung:

eine .bashrc im $home erstellen
folgendes eintragen:


export PATH=/usr/local/bin/:$PATH

Raspberry PI Image erstellen

Um ein Backup zu erstellen:

diskutil list

Die entpsrechende Geräte-ID merken z.B. /dev/disk2

diskutil umountDisk /dev/disk2

sudo dd if=/dev/disk2 of=~/Desktop/raspberrypi.dmg

Es wird ein Image auf dem Desktop erstellt, mit dem Namen raspberrypi.dmg

Zurücksichern:

diskutil umountDisk /dev/disk2
sudo dd of=/dev/disk2 oif=~/Desktop/raspberrypi.dmg

Fortschritt anzeigen:
In einem zweiten Terminal

sudo kill -INFO $(pgrep ^dd)

eingeben. Im Fenster in dem der dd-Prozess läuft wird der Fortschritt eingeblendet, ohne den Prozess zu beenden.

Rclone mit OSX und GoogleDrive – verschlüsselt

Beschreibung:

Auf einem Google-Drive wird der Ordner „rclone“ erstellt. Innerhalb dieses Ordners werden verschlüsselte Ordner für jede Anwendung erstellt, z.B. ebooks

Vorarbeit

Einloggen in Google-Drive, Erstellen des Ordners „rclone“.
Auf den Ordner klicken. Im Browser die root-folder-id (string nach folders/) kopieren.

Installation

brew install rclone

Einrichten

rclone config

neue remote
name rclone
google drive auswählen

client_id und client_secret

ignorieren (return) eintragen. Auf der Google-Console können neue IDs und Secrets erstellt werden. siehe https://rclone.org/drive/#making-your-own-client-id

3 Auswählen für
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"

root-folder-id:
Die Id aus Vorarbeit eintragen. Damit wird der bereits erstellte Ordner „rclone“ als root des rclone-Dateisystems benutzt.

service_account

leer lassen

Bei

AutoSetup

Wenn das Setup remote geschieht, No wählen.
Es wird eine Auth-Id angefordert, dazu muss man sich im Browser bei der GSuite authorisierien.

Die rclone-config Datei findet man unter MacOS unter:

.config/rclone/rclone.conf

Sollte am Ende so aussehen:

[rclone]
type = drive
client_id =
client_secret =
scope = drive.file
root_folder_id = dev$n232nv...
service_account_file =
token = {"access_token":

Crypt:

Noch einmal rclone config starten
Name:

chris-crypt
Art: 8 Encrypt/Decrypt a remote

Jetzt den Namen der vorigen Remote eingeben und einen Pfad anhängen:
Beispiel:

rclone:/chris-crypt
Encrypt File Names "standard"

wählen

1 Encrypt Directory Names

wählen

Yes Type in my own password

Am Ende sollte das so aussehen:

[chris-crypt]
type = crypt
remote = rclone:/chris-crypt
filename_encryption = standard
directory_name_encryption = true
password = *** ENCRYPTED ***
password2 = *** ENCRYPTED ***

——————–

Anwendung:

rclone copy test-macbook/ chris-crypt:/macbook/
kopiert den Inhalt von test-macbook nach google-drive/rclone/chris-crypt/macbook

In der Google-Drive Webanwendung sieht man den namen des Ordners „chris-crypt“ noch klar lesbar, danach sind sowohl Inhalt, Dateinamen als auch Ordnernamen verschlüsselt.

Mit RcloneBrowser kann man bequem durch die normalen und verschlüsselten Ordner browsen, Datei-Operationen durchführen oder einen Ordner direkt mounten.

OSX Mails aus der Kommandozeile versenden

Quelle:
https://apple.stackexchange.com/questions/12387/how-to-send-an-email-from-command-line

Configure Postfix for Gmail SMTP Edit file /etc/postfix/main.cf

sudo vim /etc/postfix/main.cf
and add in the following below the commented out relayhosts :-

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
Generate sasl_password if not already exists

sudo vim /etc/postfix/sasl_passwd
and enter in the following:-

[smtp.gmail.com]:587 username@gmail.com:password
Run the following commands

sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo launchctl stop org.postfix.master
sudo launchctl start org.postfix.master
And you are done….
Now, you should be able to send emails from within the command line e.g. to send the contents of a directory as a tree to an email address

tree /var/www/somefolder | mail -s „contents“ your@yourdomain.com