Category Archives: OS X

sudo with Touch ID on macOS

Apple Touch ID with sudo in macOS

If you like to integrate Touch ID in sudo, you can do this easily in macOS and use the fingerprint.

Integration in sudo

Just edit the /private/etc/pam.d/sudo file and put a line inside.

sudo -e /private/etc/pam.d/sudo

Put the following information inside:

auth       sufficient     pam_tid.so

The file should look like:

# sudo: auth account password session
auth       sufficient     pam_tid.so
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

Testing

To test the integration, just echo with sudo.

sudo echo "test"
sudo with Touch ID
sudo with Touch ID

Macbook delete fingerprint information

Apple fingerprint information clear

If you want to return, repair or sell your Apple device. Then you should make sure that all data is deleted. This way the fingerprint information should also be deleted.

Clear Touch Bar information

To delete the fingerprint information, the Apple device must be set to Recorvery mode and open the Terminal.

  1. Restart
  2. Hold down Command-R
  3. Utilities -> Terminal
xartutil –erase-all

You get the question if you are sure, you have to confirm this with “yes” and press Return.

Checking

After rebooting, you can easily check the settings to see if it worked.

no fingerprint

macOS Sierra – [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0

If you have problems, when you update to macOS Sierra and receive this message:

[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0

Reinstall with brew libevent package:

brew reinstall libevent
==> Reinstalling libevent
==> Downloading https://homebrew.bintray.com/bottles/libevent-2.0.22.sierra.bottle.1.tar.gz
######################################################################## 100,0%
==> Pouring libevent-2.0.22.sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/libevent/2.0.22: 734 files, 2.0M

OS X dd status

OS X dd status
OS X
If you want to use dd and get the status information, you have to do this:

dd

dd if=./ubuntu-14.04.1lts-minimal-odroid-c1-20150131.img of=/dev/disk2

Status

watch killall -INFO dd

In the terminal where dd is running, you get the status.

dd if=./ubuntu-14.04.1lts-minimal-odroid-c1-20150131.img of=/dev/disk2 bs=4m
6+0 records in
5+0 records out
20971520 bytes transferred in 9.587478 secs (2187387 bytes/sec)
7+0 records in
6+0 records out
25165824 bytes transferred in 12.823707 secs (1962445 bytes/sec)

Mac screenshot shortcut

Mac screenshot shortcut

 

If you like to create a screenshot under OS X, you must press the following shortcuts.

 

Screen

Cmd + Shift + 3 / Save the screen in one file
Cmd + Ctrl + Shift + 3 / Save the screen to the clipboard.

Area

Cmd + Shift + 4 / Save a selected area in a file.
Cmd + Ctrl + Shift + 4 / Save a selected area to the clipboard.

Window

Cmd + Shift + 4, space bar / Save a selected element/window in a file.
Cmd + Ctrl + Shift + 4, space bar / Save a selected element/window to the clipboard.