May 182018
 

In all the years I’ve been running OS X (or MacOS as it is now called) I’ve never had the need to su,sudo was always good enough. And this is as it should be.

Until now. Obvs, “root” is disabled in High Sierra. So…

$ cd /System/Library/CoreServices/Applications/
$ ls

Some cool apps here…

drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 About This Mac.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Archive Utility.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Directory Utility.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Feedback Assistant.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Folder Actions Setup.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Network Utility.app
drwxr-xr-x  3 root  wheel    96B May  2 10:03 RAID Utility.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Screen Sharing.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Storage Management.app
drwxr-xr-x  3 root  wheel    96B May  2 10:03 System Image Utility.app
drwxr-xr-x  3 root  wheel    96B Mar 30 12:48 Wireless Diagnostics.app

Open Directory Utility is the chappie we are interested in

$ open Directory\ Utility.app

@ menu bar: Edit >> Enable Root User
Set the password… y’all know the rules here.

Oh, look! What’s this? Past Self left me a little note. Thanks, Past Self! http://stephen.yearl.us/ssh-key-pair-authentication/

$ su
Password:
sh-3.2#
sh-3.2# cd ~
sh-3.2# pwd
/var/root
sh-3.2# ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa_4096
Generating public/private rsa key pair.
...
Your identification has been saved in /var/root/.ssh/id_rsa_4096.
Your public key has been saved in /var/root/.ssh/id_rsa_4096.pub.
...
sh-3.2# cp id_rsa_4096.pub /Users/yearluk/Desktop/root@xolotl-id_rsa_4096.pub
sh-3.2# exit

Job’s a good un!

Sep 232014
 

I keep meaning to get around to do this, but never do. This evening I took a look at exercism.io and the installation of its CLI program had a homebrew option, so then was a good a moment as any, that and with the imminent relsease of OS 42 (X.10.10)…

$brew -v

==> 0.9.5

$sudo chown -R `whoami` /usr/local
$cd /usr/local
$git fetch origin
$git reset --hard origin/master
$brew cleanup
$brew upgrade

==> ALL OK!

$brew update

==> Err. re. tap … but mostly OK.
–exercism install–

$brew tap homebrew/binary
$brew install exercism

==> Err 🙁 “no available formula for exercism” “searching taps…”

$brew untap homebrew/binary
$brew upgrade
$brew update
$brewcleanup
$brew tap homebrew/binary
$brew install exercism

==> DICE

$exercism configure --key=MY_API_KEY

==>config at ~/.exercism.json
==> API key is in accounts at exercism.io