Posts for: #fun

Sudo Fun

I always add a file into /etc/sudoers.d/, just remeber the last entry is trump, so it can overturn the first entries. Because of this I always like to name the files like below. /etc/sudoers.d/999_nick /etc/sudoers.d/001_rick /etc/sudoers.d/111_slick-rick /etc/sudoers.d/222_slick-nick This means if there’s an entry in 999_nick that conficts with any of the others it will trump the other configs. This is how to run without password and only specific program, this is useful, for example my telegraf config when it has to run an exec, but the telegraf user doesn’t have perms.
MORE →

Pleroma with Backblaze-B2 behind Cloudflare CDN

Make sure Backblaze is working with Cloudflare. This can be found HERE Uncomment out the below. I made my Backblaze URL s3.DOMAIN.COM nano /etc/pleroma/config.exs # Configure S3 support if desired. # The public S3 endpoint (base_url) is different depending on region and provider, # consult your S3 provider's documentation for details on what to use. # config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.S3, base_url: "https://s3.DOMAIN.COM/file" # config :pleroma, Pleroma.Uploaders.S3, bucket: "BUCKET_NAME", # bucket_namespace: "my-namespace", # truncated_namespace: nil, streaming_enabled: true, strip_exif: true # # Configure S3 credentials: config :ex_aws, :s3, access_key_id: "0000000000000000000000000", secret_access_key: "AAAAAAAAAAAAAAAAAAAAA", # region: "us-west-002", scheme: "https://" # # For using third-party S3 clones like wasabi, also do: config :ex_aws, :s3, host: "s3.
MORE →

2014 MKZ Factory Door Code retrieval

You have to have at least two keys. Enter car as normal (DUH!! :-b) Find back up key slot, ours is under the cup holder insert, it has a little indent that looks like our key Put key in slot Put in accessory mode by pushing start without foot on brake Wait 3-5 seconds Shutoff car Remove key Put 2nd key in place Put in accessory mode by pushing start without foot on brake once again
MORE →

OPNSense as wireguard client and route LAN split tunnel

Install and configure wireguard I use the Wireguard install script to create the config we import into the wireguard. That is located HERE Generate your first wireguard config. After running the script above it will ask you for a client name, I would name it something relating to opnsense Install Wireguard on OPNSense | System -> Firmware -> Plug-ins -> select and install ‘os-wireguard’ Get to wireguard config | Refresh the page, then go to VPN -> Wireguard
MORE →

Install Duplicati as Windows Service

Here’s how to install Duplicati as a Windows Service Download Duplicati from HERE During install don’t mark Auto Start up option Open CMD as admin Navigate to the installation folder in CMD (this should be the same as long as you left it as default) cd "C:\Program Files\Duplicati 2\" Now we will install the service .\Duplicati.WindowsService.exe install Now restart your computer (this isn’t needed, but it’s a good way to test)
MORE →

Remote shell access to Windows machine on Domain

This seems to be just like connecting via SSH to a Linux machine, but with Windows. I’ve only tested with Windows 10, but it works great. Download PSEX HERE. Extract ZIP wherever (I like to use 7zip). CD to that location via CMD as domain admin (this is assuming domain environment, run CMD as administrator by right clicking, then run as administrator) Run the following .PsExec.exe \PCnameORip cmd.exe You are now in a remote shell You can also use winrs as well
MORE →

Send email using postfix

There’s many times when I want to send an email for testing using postfix and I can never remember how to do it. Here is how.This is super useful to make sure your SMTP relay thru AWS/Postmark is working as it should. Then you can tail /var/log/mail.log to see if it worked or if it got rejected for whatever reason. First type the following to start sendmail sendmail [email protected] Now we can type in or paste the following
MORE →

Equalize Pricing Tables Height with Divi

How to make the pricing table height the same. When using the pricing tables module you will see that the height of each table is going to rely on the content you put there, so if you have different content in each table, you will see something like this: This might be okay, but you may want to have those tables show with the same height. You can use the following CSS code:
MORE →

Change username for cPanel user

Unfortunately it doesn’t appear cPanel allows you to easily change the username. Most documentation I’ve read says to use the “Rearrange an Account” option, but if you only have one disk that doesn’t seem to get you an option. The downside to this is that is doesn’t fully do a normal restore it will restore the new account to the new directory, but it will symlink the old username to the new directory.
MORE →

Acme.sh with NGiNX

First you have to install acme.sh. I like using acme.sh because it’s all bash based. As with all posts I take no responsibility for anything and this is more of a quick help instead of a full guide. I have a script that I use to deploy my WordPress sites. The only thing I recommend is if you use it make sure to add the xml-rpc.php block. I haven’t added that to it yet.
MORE →

Fix Domain Trust Issues

There error comes in many forms one of the forms are “The trust relationship between this workstation and the primary domain failed.” If you’re able to log into the machine as a local admin it’s easy, you just do the following. Use a local administrator account to log on to the computer. Select Start, press and hold (or right-click) Computer > Properties. Select Change settings next to the computer name. On the Computer Name tab, select Change.
MORE →

Auto Expand last partition using parted

I was having issues finding the correct way to add the remaining free space to the last partition (afraid to do so since it was on a live machine). I was finally able to figure it out. Use this to see free space parted /dev/sdX print free Then this to expand parted /dev/sdX (parted) resizepart Partition number? ENTER NUMBER FROM ABOVE THAT HAS THE LVM End? [1075MB]? 100% (parted) q Then now since this was on a server that uses LVM you have to resize the PV
MORE →

Xiaomi Aqara ZHA Home Assistant

This is how to use the Xiaomi Aqara Wireless Double Button without the Xiaomi Home Hub (A ZIGBEE STICK IS STILL REQUIRED) using ZHA in Home Assistant. Other devices just work without any hard to find IDs. ADD DEVICE TO ZHA Go to “Configuration” Then “ZHA” Hit “Add Devices” Hold down left switch while lights are blinking until the left light blinks and stops You can now name your button and hit the back button in the upper left hand corner
MORE →

Setup Unifi Controller on Debian10 /Buster

The script to do this for you can be found HERE If you want to run in a single line (not always a great idea if you don’t trust the source. Hopefully you trust me :-) curl -s https://leffler.tech/scripts/unifi-buster.sh | bash Manually below Link to original persons blog post The requirements of the Unifi Controller do not allow a direct installation. But with a few manual steps a successful setup is possible!
MORE →

Bypass PiHole DNS using PiHole DHCP

This works if you’re having PiHole hand out DHCP on your network. nano /etc/dnsmasq.d/05-no-pihole-dhcp.conf Now we need to add the following to the file. You can change 1.1.1.1 to anything you want # Assign alternate DNS for select hosts # Set Specific Clients to be affected dhcp-mac=set:altdns,00:00:00:00:00:00 #Device 1 dhcp-mac=set:altdns,00:00:00:00:00:00 #Device 2 # Set Alternate DNS dhcp-option=tag:altdns,option:dns-server,1.1.1.1
MORE →

Remote Control Terminal Session Windows Server

I just learned that you can remote control terminal sessions. They call it shadowing. I’ve only done it on Windows Server 2012 r2, but was super easy. You just need to open server manager, go to remote desktop services, then collections, then QuickSessionsCollections. Then you’ll see the connections in the upper right hand corner. Once you find the one you want you right click on the session and hit Shadow. By default this will ask the user to allow, if you want to override that and allows allow you can do the following group policy change.
MORE →

NextCloud with Apache behind NGINX reverse proxy on CentOS

This is probably useful to figure out how to reverse proxy Apache behind NGINX, but I was finally able to get NextCloud working on NGINX with no problem I like to use NGINX as my web server because that’s what I’ve always worked with. I’ve tried a couple times to get NGINX to work with NextCloud, but it would also end up not letting me log in. I did some Googleing and I guess it has something to do with how the cache is handled in NGINX.
MORE →

Cisco Cheat Sheet

Enter enable mode: en Enter Global Config (use this mode for 99% of the configuration, must be in enable mode): conf t Set port back to default default int G0/4 Encrypts all passwords on the device: service password-encryption Configure enable password (or secret in this case): enable secret ________ Create user with highest privilege: username _____ priv 15 password ______ Generate RSA key for SSH (needed if you plan to use SSH):
MORE →

Comments: