Skip to content

Instantly share code, notes, and snippets.

@jtdressel
jtdressel / __description__ macOS - Fix for sudo command error: "unable to initialize PAM: No such file or directory" (Intel+M1)
In most cases, the `sudo` command error `unable to initialize PAM: No such file or directory` mostly appears when the pluggable authentication module file `/etc/pam.d/sudo` was edited with a typo or wrong pam module, etc.
## Via Single-User-Mode > Terminal
If you have an older Mac, you can boot into `single-user mode`, directly into the command line mode of macOS by skipping the UI:
* Press and hold down `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`.
* Close the Terminal via the menu from the top of the screen
* Restart your machine
* Back into the UI, open your Terminal, and verify the file content fix with `cat /etc/pam.d/sudo`. If everything looks good, give it a try by running: `sudo whoami`.
Need:
Cow moo
Smg fire
Sniper fire
Abduction beam
Soldier shot
Alien shot
Aien dies
Select item sound
@jtdressel
jtdressel / AOYUDDEAP
Created November 8, 2012 23:01
yUML diagram for an accounting program
[note: AOYUDDEAP: As of yet unnamed distributed double entry accounting program.{bg:cornsilk}],
[Account|+UUID+;Name;Type;Parent|+Login();+Logout()],
[TransactionFragment|UUID;Amount;Account;Transaction],
[Transaction|UUID;DateTime;Memo;],
[TransactionFragment]2..*-1[Transaction],
[TransactionFragment]1*-1[Account],
@jtdressel
jtdressel / pidginLogs.sh
Created June 19, 2012 17:41
Pidgin log backup chat script
#!/bin/bash
#Copies chat logs to dropbox
rsync -azv /home/jtdressel/.purple/logs/ /home/jtdressel/Dropbox/logs
@jtdressel
jtdressel / .gitignore_global
Created February 22, 2012 19:06
My global .gitignore file
#http://help.github.com/ignore-files/
#http://sujee.net/tech/articles/gitignore/
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
[Account|GUID;LastModified;Name;Parent|method();]
[Transaction|GUID;name;memo;LastModified;dateTime;|method();]
[Subtrans|GUID;amount;account;note;LastModified;]
[Host|GUID;Name;type]
[Amount|GUID;number;currency]
[Subtrans]1-1..*[Transaction]