Categorieën
Uncategorized

Jellyfin (docker) quick and dirty

Done on Debian, Docker required. Mind the folder names.

Preparation – Mount a samba share via fstab

create a folder/mountpoint:
mkdir /media/video

For safety create a credentials file in your home folder called .smbcred
nano .smbcred

Paste and customise
username=shareusername
password=sharepassword
Save and change permissions:
chmod 600 ~/.smbcred

Edit fstab:
sudo nano /etc/fstab

Paste and customise:
//yourserver/yourshare /media/video cifs credentials=/home/youruser/.smbcred 0 0

Save & exit, reload fstab:
mount -a

Check if the folder is accessible.

Running Jellyfin

Create folders for Docker bind mounts:
sudo mkdir /usr/jellyfin
sudo mkdir /usr/jellyfin/config
sudo mkdir /usr/jellyfin/cache

Get container:
docker pull jellyfin/jellyfin

Start Jellyfin using the folders created before:
sudo docker run -d --name jellyfin --user 1000:1000 --net=host --volume /usr/jellyfin/config --volume /usr/jellyfin/cache --mount type=bind,source=/media/windows,target=/media --restart=unless-stopped jellyfin/jellyfin

Check user and group values if necessary. (id -u youruser and id -g youruser)

Jellyfin should be up and the cifs share should be available, check http://yourserver:8096 and finish the wizard

In case of issues or more info check https://jellyfin.org/docs/general/administration/installing.html

Using Windows shares

Jellyfin does not handle SMB, media folders on Windows machines should be mounted on the local server in /etc/fstab. Point docker to the mountpoint.

Categorieën
Uncategorized

View Windows oem 10 product key

No use for shady tools. Just run the following from the command line:

wmic path softwarelicensingservice get OA3xOriginalProductKey

Categorieën
Uncategorized

Lighttpd won’t start on Edgerouter 4

After messing around with certificates the Web GUI unceremoniously crashed and couldn’t be persuaded to come back to life. After using

sudo systemctl restart lighttpd

sudo systemctl status lighttpd

* lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-06-06 22:37:34 CEST; 20s ago
Process: 20876 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
Process: 20873 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 20876 (code=exited, status=255)

The last thing I did was to add a certificate for the Web Gui, cf_origin.cert. This errored out and the gui failed because I probably clicked the wrong thing. GTFO.

Check if the error is still present in the configuration. First run configure mode, then:

run show configuration |grep cert

description "certbottest 80"
cert-file /home/bas/cf_origin.cert <------------
[edit]

‘T is.

GUI is a service in EdgeOS or whatever it’s called so:

show service gui

cert-file /home/bas/cf_origin.cert
http-port 80
https-port 443
listen-address 192.168.2.1
older-ciphers enable
[edit]

The specific line has to be deleted. Just use the value the specific line starts with (cert-file in this case)

delete service gui cert-file

show service gui

-cert-file /home/bas/cf_origin.cert <--- note the hyphen
http-port 80
https-port 443
listen-address 192.168.2.1
older-ciphers enable
[edit]

It’s deletion confirmed:

commit

Le double check: show service gui

http-port 80
https-port 443
listen-address 192.168.2.1
older-ciphers enable
[edit]

Restart lighttpd:

sudo systemctl restart lighttpd

sudo systemctl status lighttpd

* lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; static; vendor preset: enabled)
Active: active (running) since Sun 2021-06-06 22:50:28 CEST; 30s ago
Process: 21730 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 21733 (lighttpd)
CGroup: /system.slice/lighttpd.service
|-21733 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
`-21737 python /var/www/python/gui.py
[edit]

Joy to the world, the GUI can be accessed again. Basically the whole thing revolves around grepping the thing you messed up or looking it up old-school in the configuration: run show configuration. This will narrow it down.

Categorieën
Uncategorized

Fix “Sorry, but you’re not permitted to view these materials at this time.” Steam age error

If you’ve accidentally submitted an incorrect birth date (too young) on a Steam product page your access to the content will be blocked and there isn’t an option to reset this.

To circumvent this message (in Chrome):
– Go to the page displaying the error message or the page that show the birth date selector
– Open the Chrome menu and go to “More tools” > “Developer options” or press F12
– In Developer options go to the Application tab
– Search for the “birthtime” cookie, right click it and select delete. Close Developer options.
– Now enter a functional birth date and you’re good to go

Categorieën
Chrome OS Computers Printers

Laser printer not available in Chrome OS? Try a ppd file.

Recently I wanted to print a document from my Chromebook. Unfortunately my printer is an older Ricoh laser printer that isn’t supported by Chrome OS so I thought I ran out of luck. After some googling I learned about PPD files. According to Wikipedia a PPD file is:

PostScript Printer Description (PPD) files are created by vendors to describe the entire set of features and capabilities available for their PostScript printers.

A PPD also contains the PostScript code (commands) used to invoke features for the print job. As such, PPDs function as drivers for all PostScript printers, by providing a unified interface for the printer’s capabilities and features.

Getting a ppd file for your printer

First of all use your search engine to search for a combination of your printer model or make and “ppd”:

Download the specific PPD file for your printer and start configuring.

Configuration

You will need the IP adress of your printer. If you don’t know this and you’re feeling lazy just download Fing from the Android Play Store, use it to scan your network and determine the IP address. A hostname would be even better since the IP address  might change in the future. I just assigned a static address to the printer in my router.

In Chrome OS go to settings > advanced > printing

In the window that appears fill out the necessary fields. Be sure to select Appsocket (TCP/IP)

And click Add

In the next window just select the PPD file you downloaded earlier:

And presto, printing is enabled.

Categorieën
Computers

Add SSH key to iLO4 user for authentication

This how-to is based on https://lodge.glasgownet.com/tech/automating-server-startup-with-hp-ilo/ but adapted to iLO 4 (2.73)

1. iLO User

To add a new user, log in to the iLO web interface and select Administration > User administration. For purposes of this how-to a user named ilouser is created

To set up key based authentication, it is wise to set up a user with only the functions you require enabled. Note down the password, but be aware that it is not required after this stage.

2. SSH Key
Once the user has been set up on the iLO, a key-pair with the same username has to be generated. At the command line on a Linux machine, generate the keypair with:

ssh-keygen -f ilouser -C ilouser

ssh-keygen will ask you to enter a passphrase. If you add a passphrase you will have to supply this every time you log in, this is the safest route. Optionally you can skip the passphrase so you can log in directly.

The example above will create a 3072-bit RSA (and SHA256) key, this will result in two files:

pihole:tmp $ ls
ilouser ilouser.pub

ilouser – this private key remains on the source machine
ilouser.pub – this is the public part that will get uploaded to the iLO

Do not change the permission modes on the files, as SSH checks them on use. It will not use files with loose permissions.

3. iLO SSH Key Authentication
Log in to the iLO again, and select the Administration > Security menu. Put a check before the ilouser user and select Authorize new key. A new element will appear in which you have to paste the contents of ilouser.pub.  In your bash shell type:

cat ilouser.pub

And copy+paste the entire content as-is in iLO, including the ssh-rsa and ilouser bits. Finish by clicking ‘Import Public Key’

4. Testing Login
Test that the system can log in by specifying the location of the private key (the file without the .pub), the username to login with, and the hostname.

ssh -i /home/username/ilouser ilouser@server.lan

All being well, you will be presented with the iLO SSH interface after a short delay. If you encounter an error involving dispatch_protocol_error, then your iLO firmware should be updated. It will still allow you to execute commands non-interactively though.