OWC Aura Pro X2 SSD in MacBookPro 13i *2015 > fix crash on sleep issue

Drive type: NVMe SSDs running macOS 10.13 or later (as boot volumes)

sudo pmset -a standby 0

https://eshop.macsales.com/Service/Knowledgebase/Article/26/785/NVMe-SSDs-Standby-Mode-Issue

TimeMachine Backups > um festzustellen, was sich beim Backup ändert (!), gleich geblieben ist (-) und dazugekommen ist (+):
tmutil compare -s

Disable Boot on Lid Open / Power Connection on MacBook Pro (2016+)

  1. Open the Terminal, which is found in /Applications/Utilities/, and then enter the following command syntax exactly:
sudo nvram AutoBoot=%00
  1. Hit return and authenticate with the admin password (necessary due to sudo)
  2. Exit Terminal when finished

With AutoBoot turned off, when the MacBook Pro lid is opened, it will no longer boot the computer or turn the computer on simply by opening the lid. Additionally, connecting the power cable will not automatically boot the Mac. Instead, the behavior is like it was on earlier Macs, which can open the lid of a Mac without turning the computer itself on. 

Return to Default Setting of Booting on Lid Open with MacBook Pro

To return to the new default setting of booting automatically when the lid opens or when the power is connected, return to the command line and issue the following command syntax:

sudo nvram AutoBoot=%03

Hitting return and authenticating will complete the change. You can also reset Mac NVRAM to return the setting to default.

If you’re not sure what setting is enabled, using “nvram -p” will print the nvram settings that have been or can be configured.

This is a handy tip similar to adjusting whether or not the new MacBook Pro makes a boot sound effect or not. Thanks to a thread on MacRumors forums for the appropriate AutoBoot syntax.

How to See All Third Party Kernel Extensions in Mac OS X

The full syntax to see third party kernel extensions is as follows:

kextstat | grep -v com.apple

If Terminal says that permissions reset failed

When following the previous steps, if you get a message that permissions reset on user home directory failed (error -69841), follow these steps.

If your Mac is using macOS Mojave

  1. Quit Terminal.
  2. Choose Apple menu  > System Preferences, click Security & Privacy, then click Privacy.
  3. Click the lock , then enter your administrator password.
  4. From the list of items on the left, select Full Disk Access. 
  5. Add Terminal to the apps allowed full-disk access: Either use the add button , or just drag the Terminal app into the space above it. 
  6. Open Terminal, then enter chflags -R nouchg ~.
  7. Enter  diskutil resetUserPermissions / `id -u` again.
  8. When the process completes, restart your Mac.
  9. Choose Apple menu  > System Preferences, click Security & Privacy, then click Privacy.
  10. Click the lock , then enter your administrator password.
  11. From the list of items on the left, select Full Disk Access. 
  12. You can now remove Terminal from the apps allowed full-disk access, or just deselect the checkbox next to Terminal.

     

Passwort-Richtlinie ändern (Mojave):

pwpolicy -clearaccountpolicies

Optionen:
pwpolicy -u user -getpolicy
pwpolicy -u user -clearaccountpolicies

Hide a user account in the macOS login window

1. Log in as an admin user.

2. Use this Terminal command. Substitute the short name of the user that you want to hide for “hiddenuser”:

sudo dscl . create /Users/hiddenuser IsHidden 1

The user account is also hidden in System Preferences the next time it’s opened. This command can’t be used with the Guest user account. Learn how to manage the Guest user account.

If you want, you can delete the IsHidden attribute instead.

Hide the home directory and share point

You can move the hidden user’s home directory to a place that’s not visible from the Finder. And you can remove the hidden user’s Public Folder share point.

This command moves the home directory of “hiddenuser” to /var, a hidden directory:

sudo mv /Users/hiddenuser /var/hiddenuser

This command updates the user record of “hiddenuser” with the new home directory path in /var:

sudo dscl . create /Users/hiddenuser NFSHomeDirectory /var/hiddenuser

This command removes the Public Folder share point for the user with the long name “Hidden User”:

sudo dscl . delete "/SharePoints/Hidden User's Public Folder"

Anmeldebildschirm: Anzeigen von «Andere …» oder «Other …»

sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool TRUE

Show a hidden user account

If you want to show the hidden user, set the user’s IsHidden attribute to 0:

sudo dscl . create /Users/hiddenuser IsHidden 0

!/bin/bash

if [ $1 == ‘ns’ ]; then
while true; do
echo Enter a domain:
read domain
echo “”
dig ns $domain +short
echo “”
done
elif [ $1 == ‘mx’ ]; then
while true; do
echo Enter a domain:
read domain
echo “”
dig mx $domain +short
echo “”
done
elif [ $1 == ‘whois’ ]; then
while true; do
echo Enter a domain:
read domain
echo “”
whois $domain
done
fi

Crontab editieren für Zugriffsrechte

server:~ adminCOMPANY$ sudo pico /etc/crontab
GNU nano 2.0.6 File: /etc/crontab Modified
$NetBSD: crontab,v 1.13 1997/10/26 13:36:31 lukem Exp $
edited by Alexander 2010 bis 2020v08
/etc/crontab - root's crontab
#
SHELL=/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
min hour mday month wday user command
*/5 7-19 1,2,3,4,5 * * root /bin/chmod -R 777 /Volumes/RAID1_Daten/ORDNERNAME/*
*/5 7-19 1,2,3,4,5 * * root /bin/chmod -R 777 /Volumes/RAID1_Daten/FOLDERNAME/*