chsh: PAM authentication failed

If you keep getting PAM authentication failed when trying to change shell, even when running as root, you probably have some invalid settings. Change the shell manually using vipw /etc/passwd. chsh should be back working now. vipw can be used to safely edit /etc/shadow and etc/group, too.

Commands cheatsheet

A.K.A. Commands I keep forgetting no matter how many milions time I type them Magic SysRq key commands The magic SysRq key is a key combination understood by the Linux kernel, which allows the user to perform various low-level commands regardless of the system’s state. ALT + SysRq key (usually Stamp) + .. f to call oom_kill Remove kernel module manually installed with make/dkms If you get stuff like: hid-nintendo.ko: Running module version sanity check....

Debian: mixing repositories

Just to name a few, Teamviewer, megasync, and MATLAB requires some dependecies that are still not in stretch/debian repo. Tuning apt preferences and sources you can mix repositories and satisfy some dependecies with packages from backports, testing or even experimental, just expect something to break (you shouldn’t do this on a production system). Some useful resources to start playing around with apt: AptPreferences Apt pinning My actual apt Configuration

KDE Plasma notes

No previews or thumbnails If you’re missing previews and thumbnails while browsing for files, either in settings or in Dolphin, install the following packages: apt install ffmpegthumbs mplayerthumbs kffmpegthumbnailer kio-extras External HDD and Plasma Long story short: you should pay attention using external (mechanical) HDDs with Plasma. The bug is 8 years old and it’s just being ignored (or just not considered a bug).Plasma isn’t spinning down external HDDs and turning off them off while still being powered causes damage, so you have to pay attention on what happens when you mount/unmount them....

Linux on Thinkpad P14s Gen 2

I recently got a Thinkpad P14s Gen 2 with an Intel i7-1165G7. Here are some first impressions on how well it works with Linux/Debian. TL;DR Don’t buy it. It sucks. The machine it’s absolutely terrible. Just google for “p14s gen 2 intel throttling” to get an idea. Before initiating with the installation, disable SecureBoot and set the standby/sleep feature to “Linux” on the BIOS. I installed Debian Sid starting from the non-free netinstall image of Buster then did a full upgrade after having added Sid in the sources....

Package software for Debian

This is resource list meant as checklist for contributing to the Debian project uploading a new package and mantaining it. If you just want to package a software as deb and distribute it in your unofficial repository, checkinstall and aptly provide an easy solution. Get involved: IRC #debian, #debian-mentors Find out if the software already exists in Debian Fill an Intent to Package issue (ITP) Package the software Packaging Intro How To Package For Debian Best Packaging Practices - Debian Developers References Checklists Sponsorships checklists Checklist from the gatekeepers of the archive Ask for sponsorship from a DM or a DD DebianMentorsFaq File a Request for Sponsor bug report in the Debian BTS (sponsorship-requests pseudo-package) Upload the package to mentors....

Play DRM content on Chromium

Play DRM content on Chromium You need the widevine plugin, which ships with Chrome and Firefox by default but isn’t available for Chromium. Install the package chromium-widevine. If the problem persist, manually copy the files libwidevinecdm.so and libwidevinecdmadapter.so from a Chrome install (/opt/google/chrome/) to /usr/lib/chromium/. Or wget https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.zip unzip 1.4.8.1008-linux-x64.zip sudo mkdir /usr/lib/chromium sudo mv libwidevinecdm.so /usr/lib/chromium sudo chmod 644 /usr/lib/chromium/libwidevinecdm.so

Quickly set up a LISP IDE with Emacs

Install a LISP compiler. We’ll use Steel Bank Common Lisp. Extract the downloaded archive and run install.sh. If the binary location is not /opt/sbcl/bin/sbcl note it. Install emacs sudo apt-get install emacs Set up the MELPA repository adding this to your ~/.emacs file (require 'package) ;; You might already have this line (add-to-list ‘package-archives ‘(“melpa” . “https://melpa.org/packages/")) (when (< emacs-major-version 24) ;; For important compatibility libraries like cl-lib (add-to-list ‘package-archives ‘(“gnu” ....

Remove git-lfs

commit & push everything remove hooks: git lfs uninstall remove lfs stuff from .gitattributes list lfs files using git lfs ls-files | sed -r 's/^.{13}//' > files.txt into a “files.txt”. run git rm --cached for each file: while read line; do git rm --cached "$line"; done < files.txt run git add for each file while read line; do git add "$line"; done < files.txt commit everything git add .gitattributes git commit -m "unlfs" git push origin check that no lfs files left git lfs ls-files remove junk rm -rf ....

Restore deleted Telegram messages, medias and files from groups

Since there’s not telegram API endpoints for this, we need to call MTProto methods to retrieve messages from the “Recent Actions” (Admin Log) since deleted messages (and medias) gets moved there for 48 hours before the permanent deletion. from telethon import TelegramClient, events, sync from telethon.tl.types import InputChannel, PeerChannel from telethon.tl.types import Channel import time # Get your own api_id and # api_hash from https://my.telegram.org, under API Development. # or from https://tjhorner....