https://askubuntu.com/questions/1167691/passwordless-login-with-yubikey-5-nfc
Here is my approach:
To enable a passwordless sudo with the yubikey do the following:
sudo apt-get install libpam-u2f
# Open terminal
# Insert yubikey
Kernel.silence_warnings do | |
# do stuff here | |
end |
# Some versions of Rails have a bug where you cannot even examine the `params` object in IRB or Pry | |
# If you get a message like: "unable to convert unpermitted parameters to hash" when you try to look at it | |
# You can do this: | |
params.permit! |
# List the services | |
synoservice --list | |
# Stop a service | |
synoservicectl --stop pkgctl-EmbyServer | |
# Start a service | |
synoservicectl --start pkgctl-EmbyServer | |
# For a couple files.. | |
tar -czf archive.tar.gz file1 file2 | |
# For an entire directory - recursively | |
tar -cfz archive.tar.gz directory_path | |
# Create an archive and send to another host over SSH - extract it there | |
tar cvf - project | ssh user@ip_addr "tar xv -C /var/www" | |
# Extract a tar.gz file |
-- If necessary: | |
-- sudo su - postgres | |
-- psql | |
ALTER ROLE username WITH PASSWORD 'password'; |
https://askubuntu.com/questions/1167691/passwordless-login-with-yubikey-5-nfc
Here is my approach:
To enable a passwordless sudo with the yubikey do the following:
sudo apt-get install libpam-u2f
# Open terminal
# Insert yubikey
-- Before starting postgres server | |
-- export ENVNAME='whatever' | |
-- pg_ctl -D /usr/local/var/postgres [etc...] start | |
DROP TABLE IF EXISTS env; | |
DROP TABLE IF EXISTS env_tmp; | |
CREATE TEMP TABLE env_tmp(e text); | |
CREATE TEMP TABLE env(k text, v text); | |
COPY env_tmp ( e ) FROM PROGRAM 'env'; |
Handy one-liners for SED | |
HANDY ONE-LINERS FOR SED (Unix stream editor) Mar. 23, 2001 | |
compiled by Eric Pement <[email protected]> version 5.1 | |
Latest version of this file is usually at: | |
http://www.student.northpark.edu/pemente/sed/sed1line.txt | |
http://www.cornerstonemag.com/sed/sed1line.txt | |
This file is also available in Portuguese at: | |
http://www.lrv.ufsc.br/wmaker/sed_ptBR.html |
# Launch screen with a title | |
screen -t <title> | |
# start long running command | |
<ctrl>-a d # detach screen | |
# Launch named screen session | |
screen -S <title> | |
# live a happy life. |
(https://askubuntu.com/questions/1167691/passwordless-login-with-yubikey-5-nfc)
Although you should be careful, the process is easy and straightforward. To make it even easier, I've written this so you can simply cut and paste the following commands into a terminal:
sudo apt install libpam-u2f
pamu2fcfg | sudo tee /etc/u2f_mappings