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
| # Create a new Vue app | |
| vue create APPNAME |
| sudo su - postgres | |
| psql -d template1 | |
| alter user postgres with password 'new password'; | |
| exit # psql | |
| exit # postgres login shell | |
| systemctl restart postgresql |
| allow_any_instance_of(ActionController::TestRequest).to receive(:referrer) { 'whatever' } |
| 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'; |