Claimit script doesn't handle 2FA
chris-fp opened this issue · 3 comments
I've just tried to use this script as my IP addressing is public and not private although quite why using public is an issue is beyond me but I digress...
username and password are correct and I use 127.0.0.1 as per the instructions but I get below:-
IP Address of PMS server: 127.0.0.1
Comparing entered passwords
Comparing entered passwords ok
Validating IP address
Getting PMS Server Identifier
Getting PMS Server Identifier ok
Getting User Token from plex.tv
******** ERROR ********
We failed to authenticate towards plex.tv
Please check username and password, as well as network access
I recently added 2FA to my Plex account after the password breach problem and it appears that this script was written before 2FA was available so it won't handle any 2FA responses.
Don't suppose anybody from Plex is looking to update this script?
Unfortunately, Tommy is on holiday for the next few days, so he will not respond until after he returns home.
The script was written and updated approx. 3 or 4 years ago and, if I recall correctly, that does pre-date 2FA for Plex.
Looking through the code, shows no 2FA authentication, so you will need to wait until you hear from Tommy.
If by some stroke of luck, you run PMS on a Windows machine (unlikely), then you can use the new ClaimPMS4Win to claim your server. It does support 2FA, but it needs to be run in Windows.
See the ClaimPMS4Win Wiki for more details.
There is a reason why you need to use a private IP address for your server and that is to prevent anyone on the internet from claiming your server. They would only need to have your password/s in order to claim the server and that would lock you out of your own server.
If you are unable to put your server on a private IP address, then you may find that this script and/or ClaimPMS4Win may NOT be able to help you. You may need to come up with another solution to claim your server.
You'd just build another server if that happened.
Anyway - I changed the way the docker networking worked (bridge instead of host) and re-ran the script*, inside the docker image, using the docker IP address as the server address and that worked. I can now progress with testing.
*temporarily turned off 2FA on my account to do this. If Tommy could amend the script that would help non-windows users going forward as you cannot run the windows version within a docker image !
When using 2FA, do like this:
Pwd: secret
2FA: 1234
When asked for Pwd, enter secret1234