@Chuckpa So what to do?
Sorry I missed your reply.
I’ve been working on the “Great Password Reset” problems.
with that, I’ve created a tool to fix their systems.
The work I completed should also bypass the problem you’re having without need to undo/remove your certificate.
Would you like to give it a try?
I’m ready to try anything!
The README is there with all the instructions and recommendations.
Hopefully my rewrite (3rd time’s the charm) makes sense
Thanks for the answer It is not entirely clear why to unpack the resin? If the file is already unpacked?
Completed the instructions before the step
Elevate command line privileges to “root” (sudo bash)
The command gives the result
root@ASUSTOR:/volume1 /.@root # sudo bash
sudo: bash: command not found
root@ASUSTOR:/volume1 /.@root #
Did you grab the .sh
?
If so, then you don’t need to tar xf
it. It’s already there.
I provide the tar file to protect the sh from Windows systems.
I made a mistake on the sudo. ( I will fix that )
you want sudo sh
(bash does not exist on your NAS)
@ChuckPa Hi. That’s what I was doing. I connect to the nas from a windows computer via putty. I log in as root. I take the file from https://github.com /, it is already unpacked there, I copy it using windows on the nas to the /volume1/Public folder. There is no sudo bash command and in truth there is no nas Asustor. Under root, this command is not needed in theory. Running the file
root@ASUSTOR:/volume1/Public # ./UserCredentialReset.sh
./UserCredentialReset.sh : line 9: syntax error: unexpected newline
root@ASUSTOR:/volume1/Public #
Here is the result
I’m new to publishing on GitHub so still learning that part.
I don’t know if you’ll see exactly what I see for naming.
-
Go here:
-
Download the ZIP – DO NOT UNPACK IT
( Windows text files are not compatible here. Don’t let Windows touch the script itself) -
Copy the ZIP to the Public shared folder
-
The ZIP will be there – unzip it
-
In
UserCredentialReset-main
you’ll find the script
root@ASUSTOR-AS6102T:/volume1/.@root # cd /volume1/Public
root@ASUSTOR-AS6102T:/volume1/Public # ls -la
total 56
drwxrwxrwx 8 admin administ 4096 Sep 3 11:10 ./
drwxr-xr-x 17 root root 4096 Aug 29 01:04 ../
-rwxrwxrwx 1 admin administ 10244 Aug 24 2018 .DS_Store*
-rwxrwxrwx 1 admin administ 4096 Aug 16 2018 ._.DS_Store*
drwxrwxrwx 2 admin administ 4096 Aug 21 2018 EAE/
drwxrwxrwx 2 admin administ 4096 Nov 11 2020 HDR/
drwxrwxrwx 5 admin administ 4096 Aug 16 2018 Media Test/
drwxr-xr-x 2 root root 4096 Feb 17 2021 PlexTestFiles/
drwxrwxrwx 2 admin administ 4096 Aug 22 2018 Subtitle Burn Test/
drwxrwxrwx 2 admin administ 4096 Aug 17 2018 Transcode Test/
-rw-r--r-- 1 root root 5800 Sep 3 11:09 UserCredentialReset-main.zip
root@ASUSTOR-AS6102T:/volume1/Public # unzip UserCredentialReset-main.zip
Archive: UserCredentialReset-main.zip
creating: UserCredentialReset-main/
inflating: UserCredentialReset-main/README.md
inflating: UserCredentialReset-main/UserCredentialReset.sh
root@ASUSTOR-AS6102T:/volume1/Public # cd UserCredentialReset-main/
root@ASUSTOR-AS6102T:/volume1/Public/UserCredentialReset-main # ls -la
total 28
drwxrwxrwx 2 root root 4096 Sep 3 11:11 ./
drwxrwxrwx 9 admin administ 4096 Sep 3 11:11 ../
-rw-r--r-- 1 root root 4553 Sep 3 11:11 README.md
-rw-r--r-- 1 root root 9850 Sep 3 11:11 UserCredentialReset.sh
root@ASUSTOR-AS6102T:/volume1/Public/UserCredentialReset-main # chmod +x UserCredentialReset.sh
root@ASUSTOR-AS6102T:/volume1/Public/UserCredentialReset-main # ./UserCredentialReset.sh
Plex Media Server user credential reset and reclaim tool (ASUSTOR)
This utility will reset the server's credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim
Please enter Plex Claim Token copied from http://plex.tv/claim : claim--pXUqiBsewfSs5KdMLhT
Clearing Preferences.xml
Getting new credentials from Plex.tv
Claim completed without errors.
Username: ChuckPA
Email: ChuckIsCrazy@loonies.com
Complete. You may now start PMS.
root@ASUSTOR-AS6102T:/volume1/Public/UserCredentialReset-main #
Please enter Plex Claim Token copied from Claim | Plex : claim-zg1YpsQ_iyg_
Clearing Preferences.xml
Getting new credentials from Plex.tv
ERROR: Could not get credentials from plex.tv (Error: 60)
root@ASUSTOR:/volume1/Public/UserCredentialReset-main # Please enter Plex
ken copied from Claim | Plex : claim-zg1B4gksvr_YpsQ_iyg_
-sh: Please: not found
root@ASUSTOR:/volume1/Public/UserCredentialReset-main # Clearing Preferenc
-sh: Clearing: not found
root@ASUSTOR:/volume1/Public/UserCredentialReset-main # Getting new creden
om Plex.tv
-sh: Getting: not found
root@ASUSTOR:/volume1/Public/UserCredentialReset-main # ERROR: Could not g
ntials from plex.tv (Error: 60)
-sh: syntax error: unexpected “(”
root@ASUSTOR:/volume1/Public/UserCredentialReset-main # root@ASUSTOR:/volu
ic/UserCredentialReset-main #
Your certificate is getting in the way.
WTH is that syntax error? Everything is quoted.
Observe please:
# Get Credentials
echo "Getting new credentials from Plex.tv"
LoginInfo="$(curl -X POST -s \
-H "X-Plex-Client-Identifier: ${ClientId}" \
-H "X-Plex-Product: Plex Media Server"\
-H "X-Plex-Version: 1.1" \
-H "X-Plex-Provides: server" \
-H "X-Plex-Platform: Linux" \
-H "X-Plex-Platform-Version: $HostType $(uname -r)" \
-H "X-Plex-Device-Name: PlexMediaServer" \
-H "X-Plex-Device: $HostType" \
"https://plex.tv/api/claim/exchange?token=${ClaimToken}")"
Shellcheck (lint) returns no syntax errors.
Claim | Plex should I open this page and get a certificate with ASUSTOR ? Through the browser on the device? I have the nas itself just online and neither a monitor nor a mouse is attached to it.
Get Credentials
echo “Getting new credentials from Plex.tv”
LoginInfo="$(curl -X POST -s
-H “X-Plex-Client-Identifier: ${ClientId}” .…
Where to observe it and how?
Please check your PM (upper right corner – Green dot)
when I said “observe” , I meant “look here. This is the code”.
There is no Syntax Error possible.
Plex will only work through http://[server.local.ip.address]:32400/web and it doesnt see the asustor device. Any ideas? Trying above ResetCredential but blocked at
Plex Media Server user credential reset and reclaim tool (ASUSTOR)
This utility will reset the server’s credentials.
It will next reclaim the server for you using a Plex Claim token you provide from https://plex.tv/claim
This utility requires the ‘curl’ command which is not found.
Please install ‘curl’ or add it to ‘path’ if already installed.
@ChuckPa Noob question but when I run your script in putty via sudo sh, I am unable to use curl. Is there a way around this? Again, sorry for the noob question.
Looks like it could be that my path env var is just not picking it up. I will try a sys reboot.
Putty Log
"This utility requires the ‘curl’ command which is not found.
Please install ‘curl’ or add it to ‘path’ if already installed.
Unfortunately this didn’t seem to help. Seems like while I am using ssh to access my NAS, I am unable to access curl. Is there anything I can do to invoke curl while in sudo sh mode?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.