From 54c62cbfc26c2e58baa0d71f8e7dfb16b8af95da Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:25:06 -0200 Subject: [PATCH 1/7] configuration/installation tutorials made simple --- tutorials/changedefaultuser.txt | 14 +++++++ tutorials/googleauth.txt | 66 +++++++++++++++++++++++++++++++++ tutorials/noip.txt | 16 ++++++++ tutorials/readme.md | 5 +++ tutorials/sdcardbackup.txt | 7 ++++ tutorials/sickrage.txt | 2 + 6 files changed, 110 insertions(+) create mode 100644 tutorials/changedefaultuser.txt create mode 100644 tutorials/googleauth.txt create mode 100644 tutorials/noip.txt create mode 100644 tutorials/readme.md create mode 100644 tutorials/sdcardbackup.txt create mode 100644 tutorials/sickrage.txt diff --git a/tutorials/changedefaultuser.txt b/tutorials/changedefaultuser.txt new file mode 100644 index 0000000..9b171e5 --- /dev/null +++ b/tutorials/changedefaultuser.txt @@ -0,0 +1,14 @@ +#Step 1: Remove pi user and create your own +#Makes it more secure + +sudo su + +adduser felipe sudo +sudo useradd -m felipe -G sudo + + +sudo passwd felipe + +sudo passwd visudo + +sudo deluser -remove-home pi \ No newline at end of file diff --git a/tutorials/googleauth.txt b/tutorials/googleauth.txt new file mode 100644 index 0000000..2a3b2b0 --- /dev/null +++ b/tutorials/googleauth.txt @@ -0,0 +1,66 @@ +#Google-AUTH + +sudo su + +sudo apt-get install libpam-google-authenticator + +exit #log into the account you want to get authentication + + +google-authenticator + +#I answered all 'y' + +sudo nano etc/pam.d/sshd + +#copy this right after @include common-account +auth required pam_google_authenticator.so + + +sudo nano /etc/ssh/sshd_config +#search Challenge... and change from 'no' to 'yes' +ChallengeResponseAuthentication yes + +#In another terminal, check if it is working +sudo service ssh restart + +#OPTIONAL: Don't require code when in LAN + + + + +sudo nano /etc/pam.d/sshd + + +# use Google Authenticator +# The ‘nullok’ option tells PAM whenever no config for 2-factor authentication is found, +# it should just ignore it. This will prevent you from being locked out. +auth [success=1 default=ignore] pam_access.so accessfile=/etc/security/access.conf +auth required pam_google_authenticator.so nullok + +sudo nano /etc/security/access.conf + +# skip one-time password if logging in from the local network +# only allow from local IP range ++ : ALL : 192.168.1.0/24 ++ : ALL : LOCAL +- : ALL : ALL + + +sudo service ssh restart + +#Check in another terminal if it worked + + + +#@include common_account.. +#comment above line :X + + +#ON JESSIE: + +On Jessie have a look at /etc/systemd/system/autologin@.service you will need to change the line:- + +ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM + + diff --git a/tutorials/noip.txt b/tutorials/noip.txt new file mode 100644 index 0000000..02a3e42 --- /dev/null +++ b/tutorials/noip.txt @@ -0,0 +1,16 @@ +#CONFIGURE NO-IP + +mkdir /home/pi/noip +cd /home/pi/noip +wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz +tar vzxf noip-duc-linux.tar.gz +cd noip-2.1.9-1 + +sudo make +sudo make install +sudo /usr/local/bin/noip2 +sudo nano /etc/rc.local + +/usr/local/bin/noip2 #add this after fi and before exit 0 + +sudo /usr/local/bin/noip2 -S #check to see if works diff --git a/tutorials/readme.md b/tutorials/readme.md new file mode 100644 index 0000000..109258e --- /dev/null +++ b/tutorials/readme.md @@ -0,0 +1,5 @@ +##Simple Tutorials + +Not everything is easy, sometimes we need to search a lot to find an answer. + +Put here your tutorials which took some time to figure it out but when you did a facepalm moment happened. \ No newline at end of file diff --git a/tutorials/sdcardbackup.txt b/tutorials/sdcardbackup.txt new file mode 100644 index 0000000..103da56 --- /dev/null +++ b/tutorials/sdcardbackup.txt @@ -0,0 +1,7 @@ +#Backups: + +sudo dd bs=4m if=/dev/rdisk2 | gzip > ~/Desktop/BackupName.img.gz + +#Using backup image +gzip -dc ~/Desktop/pi.gz | sudo dd of=/dev/rdisk1 bs=1m + diff --git a/tutorials/sickrage.txt b/tutorials/sickrage.txt new file mode 100644 index 0000000..8bf7a67 --- /dev/null +++ b/tutorials/sickrage.txt @@ -0,0 +1,2 @@ +# Simple configuration, turn your raspberry pi in a Torrent Box +# Best tutorial: http://www.dennisjanssen.be/tutorials/raspberry-pi-media-center/ From 704d71d5dfd2f6ee446eecfd15df5c894ac263cc Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:26:47 -0200 Subject: [PATCH 2/7] Rename tutorials/changedefaultuser.txt to tutorials/default-configuration/changedefaultuser.txt --- tutorials/{ => default-configuration}/changedefaultuser.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tutorials/{ => default-configuration}/changedefaultuser.txt (85%) diff --git a/tutorials/changedefaultuser.txt b/tutorials/default-configuration/changedefaultuser.txt similarity index 85% rename from tutorials/changedefaultuser.txt rename to tutorials/default-configuration/changedefaultuser.txt index 9b171e5..419b1e7 100644 --- a/tutorials/changedefaultuser.txt +++ b/tutorials/default-configuration/changedefaultuser.txt @@ -11,4 +11,4 @@ sudo passwd felipe sudo passwd visudo -sudo deluser -remove-home pi \ No newline at end of file +sudo deluser -remove-home pi From afa7838c62c5e99fc149f26bb71cb35e90e6a06a Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:27:13 -0200 Subject: [PATCH 3/7] Rename tutorials/googleauth.txt to tutorials/security/googleauth.txt --- tutorials/{ => security}/googleauth.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tutorials/{ => security}/googleauth.txt (100%) diff --git a/tutorials/googleauth.txt b/tutorials/security/googleauth.txt similarity index 100% rename from tutorials/googleauth.txt rename to tutorials/security/googleauth.txt From c9aa9b6a1adb8432df398abcb8ec9f30f3bdd282 Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:27:31 -0200 Subject: [PATCH 4/7] Rename tutorials/noip.txt to tutorials/remote-access/noip.txt --- tutorials/{ => remote-access}/noip.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tutorials/{ => remote-access}/noip.txt (100%) diff --git a/tutorials/noip.txt b/tutorials/remote-access/noip.txt similarity index 100% rename from tutorials/noip.txt rename to tutorials/remote-access/noip.txt From 5d0086d3e07d9821ad3c80129ed4beac5563c5ce Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:28:02 -0200 Subject: [PATCH 5/7] Rename tutorials/sdcardbackup.txt to tutorials/backup/sdcardbackup.txt --- tutorials/{ => backup}/sdcardbackup.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tutorials/{ => backup}/sdcardbackup.txt (100%) diff --git a/tutorials/sdcardbackup.txt b/tutorials/backup/sdcardbackup.txt similarity index 100% rename from tutorials/sdcardbackup.txt rename to tutorials/backup/sdcardbackup.txt From 3ebc69d461d85b92892ece3d92a8d9f42426f78c Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:28:41 -0200 Subject: [PATCH 6/7] Rename tutorials/sickrage.txt to tutorials/automation/sickrage.txt --- tutorials/{ => automation}/sickrage.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tutorials/{ => automation}/sickrage.txt (100%) diff --git a/tutorials/sickrage.txt b/tutorials/automation/sickrage.txt similarity index 100% rename from tutorials/sickrage.txt rename to tutorials/automation/sickrage.txt From 6594e7687456e3dfe26d9b929b0a24b251941e0b Mon Sep 17 00:00:00 2001 From: Felipe Rubin Date: Wed, 18 Oct 2017 19:29:02 -0200 Subject: [PATCH 7/7] Update readme.md --- tutorials/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/readme.md b/tutorials/readme.md index 109258e..ea677ae 100644 --- a/tutorials/readme.md +++ b/tutorials/readme.md @@ -1,5 +1,5 @@ -##Simple Tutorials +## Simple Tutorials Not everything is easy, sometimes we need to search a lot to find an answer. -Put here your tutorials which took some time to figure it out but when you did a facepalm moment happened. \ No newline at end of file +Put here your tutorials which took some time to figure it out but when you did a facepalm moment happened.