Categories
Security Technology

Authentication for Free, as in Beer (FreeIPA)

I’ve been busy with work lately, but got some time this Sunday to work on the next part of my build – authentication.

The Unraid build itself is coming on well, but I now have 14 separate docker containers doing things for me, all with their own individual authentication methods. If I plan on opening up the server to external access (which I do), then I need something to manage usernames and passwords from a central point.

That something is LDAP.

LDAP stands for Lightweight Directory Access Protocol, and is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network.

The most common implementation of LDAP that people will probably have heard of is Microsoft’s Active Directory, itself an implementation of LDAP. It’s what I’m most familiar with, having worked with flavors of AD from 2003 onwards. It’s easy to setup and easy to work with, and is – in my view – the best implementation of LDAP for a heavily Windows-based environment.

I’m not exactly running a completely Windows environment. My primary machine, and that of my girlfriend, is running Windows 10. However, I have 14 docker containers (and growing), and some implementations I want to do that require some integration with whatever LDAP server you’re running, and I’m not sure how well AD would play with those.

Lastly, AD requires you to be running Windows Server, which requires a license, and also some fairly decent system requirements.

Plus, it’s fun to learn new things.

So I’ll be using something called FreeIPA (hopefully the punny title makes sense now) on a CentOS 8 install, with 2 vCPUs, 4GB RAM and a 60GB disk.

Read on for how it’s done.

Categories
Technology

Moving house with Plex & Docker

So, my data is all moved from t’old machine t’new one (for any Americans, you’ll need to read that sentence in a strong Yorkshire accent. Good luck.)

That could be that, but losing all of the ‘watched/unwatched’ and progress through series would be a bit of a pain in the arse, so I’m trying to migrate the metadata of my now-old Plex install (Razorback) to the new one (Blackjack).

On Windows, Plex stores everything in C:\Users\username\AppData\Local\Plex Media Server.

In Docker, that data is located at /mnt/cache/appdata/Plex-Media-Server/Library/Application Support/Plex Media Server/

Plex’s FAQ does include information on moving Plex data around, but it’s a far cry from what you really need to know in a scenario like this. That is fair, as there are a large number of potential scenarios and configurations that it would be unfair to expect Plex to constantly stay on top of and document adequately – after all if it doesn’t work, people would come crying to Plex and they’d have to support that or risk the wrath of Unhappy Internet People.

I’ll make this a long story short – I’m going with the basic bitch method of just copying the (several hundred thousand) files across the network from my Windows machine. I tried zipping the whole lot up and then unzipping it on the host, but with various combinations of commands I always got the same error: caution: filename not matched, which didn’t make sense then, and still doesn’t now.
I tried a number of different solutions from researching online but decided quite quickly that this is one of those annoying Linux things that I know I’ll spin my wheels on for an hour or so, and eventually just have to do it the basic way anyway.

So, I skipped ahead.

At the very least I am grateful that Plex have kept the folder structure and mechanisms broadly identical across different platforms. I’ve certainly dealt with software in my time where a Windows and a Linux version of an app were entirely incompatible and there was no hope of moving settings from one to the other, so this is a refreshing change from previous experiences.

Of course now we’ll have to see if this actually works or not. I have … middling hopes of success, but we’ll see.

A few hours later …

So the metadata is all copied over. I started the Plex Docker and immediately went into the server settings and edited my libraries; the existing libraries pointed at the old media locations, which was good. I added the new locations and let Plex scan them.

And … it worked! My On Deck still shows a half-watched episode of Brooklyn Nine-Nine, and my watched / unwatched lists are all there.

Categories
Technology

UnRAID: Building Blackjack

That’s right, the God Box has a name.
My previous naming conventions followed The Expanse series of books (and now TV), but here I’ve swapped one form of plagiarism for another.

When discussing the idea of this build with one of my colleagues, he suggested a color scheme of white-on-black, which I liked the sound of and subsequently stole.
When I was a child, I remembered these sweets called Blackjacks – white and black chewy candy – and Fruit Salads. The black & white color scheme made ‘Blackjack’ a fitting choice.

I’ll probably call the Ubuntu installation Fruit Salad (that color scheme is a bit more of a stretch …) and I still need something fitting for Windows but .. whatever, we’re getting off topic.

Let’s talk hardware.

An Intel Core i9-10850k sits on an ASRock Z490 Taichi motherboard. Not pictured is the 64GB of G-Skill DDR4 2133Mhz RAM which was (at the time of picturing) installed in my existing machine.
That CPU is cooled by the be quiet! Shadow Rock 3 CPU cooler (center). Flanking that in the image is five white be quiet! Shadow Wings 2 140mm case fans.
To the left in front of the fans/motherboard is both a 500GB and 1TB Samsung Evo 970 NVMe SSD, for use as a cache drive and VM file drive respectively.
To the far right is the Republican Party a Corsair RM750x power supply in white (with white braided cables) and atop of that is a Zotac Gaming GeForce 2060 RTX graphics card.
On top of that is a Unifi 16 port POE switch.
At the very bottom of the picture are white SATA cables, white SAS cables for the SAS controller card which will eventually be transplanted along with the other disks from my main machine, and an 8TB WD Red NAS disk for parity.

Finally, the whole lot is ensconced in a be quiet! Dark Base 700 ATX tower, with additional drive bays purchased alongside it.

So let’s get to it!