Skip to content

Instantly share code, notes, and snippets.

View aRustyDev's full-sized avatar

aRustyDev aRustyDev

View GitHub Profile
@aRustyDev
aRustyDev / fix-for-sudo-command-error-unable-to-initialize-pam-no-such-file-or-directory.md
Last active August 12, 2024 15:10
macOS - Fix for sudo command error: "unable to initialize PAM: No such file or directory" (Intel+M1)

In most cases, the sudo command displays the error unable to initialize PAM: No such file or directory mostly appears when the pluggable authentication module file /etc/pam.d/sudo has been edited with a typo or an incorrect PAM module.

Via Single-User-Mode > Terminal

If you have an older Mac, you can boot into single-user mode, which allows you to access the command line mode of macOS directly, bypassing the UI.

  • Press and hold down the COMMAND + S keys until you see commands being executed in the Terminal.

  • Open the sudo file with vi /Volumes/Macintosh\ - Data/etc/pam.d/, fix what's wrong, save and close the file by switching from INSERT to the COMMAND mode with the ESC key, type :wq!, and hit enter.

@aRustyDev
aRustyDev / CreateGhidraApp.sh
Created July 9, 2024 15:53 — forked from saagarjha/CreateGhidraApp.sh
Creates a Ghidra.app bundle for macOS
#!/bin/sh
set -eu
create_iconset() {
mkdir -p Ghidra.iconset
cat << EOF > Ghidra.iconset/Contents.json
{
"images":
[