Invalid username and/or password error on Cloud Key (Gen 1)

Issue:

I tried logging into my Cloud Key and got an "Invalid username and/or password" error, despite knowing for sure that I was using the correct username and password.
In fact, I could SSH into the device just fine using that username and password.

Cause:
Weird file system thing.

How to check:

SSH into the Cloud Key and check the mode of sudo with this command:

ls -l /usr/bin/sudo

What I saw:

-rwxr-xr-x 1 root root 131772 Feb  2  2021 /usr/bin/sudo*

That -rwxr-xr-x part should be -rwsr-xr-x.

To fix, change the file mode and reboot.

chmod u+s /usr/bin/sudo
reboot

Now when I check the file, I see this:

-rwsr-xr-x 1 root root 131772 Feb  2  2021 /usr/bin/sudo*

Information from:
UniFi Forum