Changing User Password Disabled Plex

Server Version#: Latest (inoperative)
Player Version#: Latest (inoperative)

Plex running on Centos 7.
SSH access limited to RSA Key

For security reasons, I had to change the password on the plex user for Centos 7, and afterwards, plex does not run on the web apps.

The ONLY change was the user password for the account that runs plex.

Diag steps taken:
I rebooted
I verified that I can access the account remotely using a Secure file transfer application.
The machine logs in and performs all other functions correctly, but Plex itself is inaccessible.

My assumption is that at the time of installation, Plex stores its user credentials for the account assigned to run the plexmediaserver.

Is there a way to update plex’s credentials, or am I looking at this the wrong way?

Changing the Password back to the compromised password does not resume function.

I was hoping to restore operation and get the software information to add detail, but no dice.

I’m not super proficient with Databases.

I am using the Plex server for learning (Which, holy moly, am I learning), But I’m not yet to the proficiency to dive into the databases.

Since a password was changed, I’m assuming that the credentials don’t match somewhere, but most password databases are not easily accessed, which is my worry.

Do you know the framework of how plex uses the OS login info, or could you point me to a database that I could try and check in?

Any other ideas as to why this would happen?

If I may provide some input here?

  1. When Plex is installed, the username plex is created and the account is set to /sbin/nologin. It is not to be used as a login account. Access to the server is controlled entirely by the owner’s Plex.tv account with access granted to those Plex.tv accounts he/she has decided to share with.
  2. The only credentials stored on your server (there are none in the database) are your Plex.tv account information(PlexOnlineUsername) and XPlexToken (Plex.tv’s authentication to your account). These are stored in your Preferences.xml and on Plex.tv for authentication purposes of the server itself only.
  3. Should you need to change your Plex.tv account password, the process is simple:
    a. Sign the server out (Settings - Server - General)
    b. Sign your Plex/web (Web browser session) out of your Plex.tv account
    c. In a new tab, Go to Plex.tv -> My Account - Settings - Password - Edit entering the new password (twice) and the current password.
    d. Also, to force log out all devices signed in under this old password, Check the box below the password fields.
    e. Save Settings (which generates new security credentials and updates Plex.tv)
  4. Now return to your Plex/web tab and sign in with the new Password
  5. Settings - Server - General - Sign in with the new password.
  6. Sign all other devices back in using the new account password
  7. The server and all devices on the master account are now using the new password.

To be clear, At no point in time is there any need to change user plex to an account which can be logged into. plex:plex is nothing more than a username created to run in the Linux environment, without using root privilege, and keep it unique and free of conflicting with other services.

If user plex is currently used as a login account, it is strongly recommended to change its shell to /sbin/nologin and manually edit the password field in /etc/shadow replacing the password there with xxxxxxx (impossible result of encryption)

I would like to see some full logs of the system in question:
sudo tar cfz /tmp/Plexlogs.tar.gz “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs” will be more than adequate. (Upload the Plexlogs.tar.gz)

Some notes:

While running through your recommendataion, I’m noting that there is no /sbin/nologin shell listed in /etc/shells, so I cannot set plex to the nologin shell.

(My default is to follow directions first, question second) But I also use SSH over an SCP connection to transfer media to the server, so I’m not sure how setting the plex user account with the media files to nologin will affect the transfer of media to the Plex?

I will need to look into understanding the format of /etc/shadow better, because I’m not sure which field is the password field. Am I understanding corectly that once I find the password, I replaced the encrypted password with " xxxxxxx" Verbatim? or are you specifying variables?

Lastly, I am not sure what I’m doing wrong with tar, but I am in the specified location looking at the logs, but it refuses to acknowledge that the folder exists using either:

sudo tar cfz /tmp/Plexlogs.tar.gz “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs”

or

sudo tar cfz /tmp/Plexlogs.tar.gz “/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/”

I only get an error:

sudo tar cfz /tmp/Plexlogs.tar.gz “/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/”
tar: “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/”: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

Additional info:

  1. chsh plex - specify the absolute path , which is in /sbin/nologin
[chuck@lizum files.308]$ sudo chsh plex
Changing shell for plex.
New shell [/bin/sh]
/sbin/nologin
Shell changed.
[chuck@lizum files.309]$ 
  1. Did you change where your Plex library is stored with a configuration override?

I get:

chsh plex
Changing shell for plex.
New shell [/bin/bash]: /sbin/nologin
chsh: Warning: “/sbin/nologin” is not listed in /etc/shells
Shell changed.

I did not manually change the Plex Library, but since I created the user “plex” before the install, I use the path under the home folder of the user “plex” (/home/plex).

I had to change the shell back to bash, as it removes my access to the account to move/access media. (so we’re on the same page on what changes are made)

Let’s rewind here.

  1. Where is the media stored? (local HD or NAS)
  2. Which username owns the media? (Your username or ‘plex’ ) ?
  3. Since you created user plex by hand, which I will do in the installer, do you see /home/plex/Library/Application Support ?
  • The media is stored on a local Hard Drive (Virtual Machine).
  • “plex” owns the media
  • /home/plex/Library/Application Support does exist, and I can acces it, which is why it’s strange that tar doesn’t recognise it.

Additional information:

  • 1 Since I’m learning, I was told never to install applications as “root”
  • 2 i created user “plex” and I could not install.
  • 3 I created another user, and installed plex from that user with user “plex” already created.
  • 4 It has worked flawlessly since then until I changed the Centos User password for “plex”
  • 5 I add media to /home/plex/* via WinSCP, so I SSH over a secure connection to user “plex” to add media

I looked up Plex migration, and I backed up the settings, but not the media yet (Waiting on a 6TB External to hold backup)

I created the Plex server in a VM on my server with Centos 7 (minimal) as the host OS.

The next Step is going to be to use NAS and mount the NAS to the plex server so that media backup will be easier, but that change has not yet been made.

I will have to wait for the external HDD (and the eternity that 3-4TB of data takes to transfer over Ethernet ) if I end up scrapping this VM and starting again from scratch.

I am also HIGHLY motivated to understand what happened, as I want to get into the Linux support field, and mistakes like this provide invaluable experience and exploration, so a dump and re-install is something I want to avoid.

I think I’m understanding what happened.

  1. Your instinct to not install as root is well founded and I don’t install, nor would I ever recommend installing / running as root.
  2. I create user plex during installation if not already created.
  3. I key off the $HOME environment variable which, with you creating it manually, becomes /home/plex versus the default I create it as /var/lib/plexmediaserver. This is where the path confusion began. My instructions to everyone assume the default. I also assume that anyone who has their Application Support directory elsewhere recognizes what I’m asking for and to edit the path.
  4. I do think, learning as you are, you have gotten a bit of a bad start but not to worry as it’s very easily corrected in Linux.
  5. WinSCP running as whatever user you log in as (which is why you probably needed the shell login for plex) added to this downward spiral.
  6. Is it safe to assume you’re running a Centos VM on Windows and not have it all figured out how to connect the two so you can avoid all the actual media copying?

I am actually running a VMWare 5 or 6 installation directly on the server and managing it remotely, it is not installed on a Windows installation.

I chose not to run an X-server on the Plex VM to minimise resource use, which is also why I use the minimal installation, but it means that File Management has to be done on the command line, or with my seperate desktop (windows) that I use WinSCP to communicate over the network to my server.

The desktop and my server are 2 seperate machines, but media creation and management is always done remotely (Windows Desktop, Windows Work Laptop, etc), so I can manage my Plex from Work, Home, or a friend’s house.

The path you gave does directly lead to the logs, and I can “ls” and all of the logs you requested are there, but even if I copy the path in “pwd” it still states the directory doesn’t exist. Why I’m confused is because the logs exist exactly where you said they would be, but “tar” doesn’t seem to recognize that it exists.

I can download the logs onto my Windows Laptop and use WinRAR to compress the archive and post it, but I will have to wait to be on my lunch.

Clarification: The server is run on a VMWare ESXi 5 or 6 installation.

So this is a native installation in a VmWare host? That makes it a ton easier.

When you get a chance, go into Linux, create the tar.gz of wherever your logs are. RAR files do no good.

Upload the tar.gz

Plexlogs.tar.gz (7.4 MB)

After some frustration with syntax, I think this should be correct.

Look:

When you use a certificate, there is a public key and a private key. Authentication requires both haves.

When you sign into your email online, they have the encryped form of password. How else could they authenticate.

I will ask you to rethink your previous post as it sounds like you’re challenging.

Are the Logs uploaded useful for diagnosis?

I changed directory into the Logs folder and ran tar as such
cd /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs
tar cfz plexlogs.tar.gz ./

It appears that the logs are within the file, but I wanted to make sure I did it right.

Yes, They show me what was going on.

YOu say it stopped working. I am trying to find out why.

Without logs as a starting point, there is nothing I can do.

1 Like

Sorry for the strange questions about the logs, I was trying to divert the other user’s conversation that has apparently shown themselves/been shown out.

You are being EXTRAORDINARILY helpful, and I didn’t want the thread hijacked.

  1. Unix/Linux is my professional career. I’ve been doing this since the dinosaurs were in diapers.
  2. When I was learning, I had some really cool people teach me the ropes. I’m just passing it forward.
  3. Should hijackers try to inappropriately play in the sandbox, I have enough tools at my disposal. (I’m also an online game moderator in another life)
1 Like