Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Linkding
  3. Linkding Password reset

Linkding Password reset

Scheduled Pinned Locked Moved Linkding
8 Posts 2 Posters 2.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • timconsidineT Offline
    timconsidineT Offline
    timconsidine
    App Dev
    wrote on last edited by timconsidine
    #1

    Purely for the purpose of reserach <cough:, nah, I'm an idiot>, how do you reset the password for Linkding?

    I can see secretkey.txt in /app/data but don't think I can reverse it.

    I have tried python3 manage.py createsuperuser --username=joe --email=joe@example.com but it returns sqlite3.OperationalError: unable to open database file

    Also trying python3 manage.py changepassword returns the same error.

    Suggestions welcome, Couldn't see anything in their github issues.

    jdaviescoatesJ 1 Reply Last reply
    0
    • timconsidineT Offline
      timconsidineT Offline
      timconsidine
      App Dev
      wrote on last edited by
      #2

      I am wondering if the database is corrupt - can't find db.sqlite3 anywhere

      1 Reply Last reply
      0
      • timconsidineT Offline
        timconsidineT Offline
        timconsidine
        App Dev
        wrote on last edited by timconsidine
        #3

        Hmmm, I attempted to restore from a backup.
        However the latest backup I have (retention policy 7 days : maybe I should increase) also does not have db.sqlite3.
        I cannot tell when it might have stopped being present (as I use the app occasionally).

        1 Reply Last reply
        0
        • timconsidineT Offline
          timconsidineT Offline
          timconsidine
          App Dev
          wrote on last edited by timconsidine
          #4

          Barking up the wrong tree
          Fresh install on temp app.domain.tld doesn't have db.sqlite3 either.
          So ... where is the database ?

          EDIT : seems like this package uses Postgres

          1 Reply Last reply
          0
          • timconsidineT timconsidine

            Purely for the purpose of reserach <cough:, nah, I'm an idiot>, how do you reset the password for Linkding?

            I can see secretkey.txt in /app/data but don't think I can reverse it.

            I have tried python3 manage.py createsuperuser --username=joe --email=joe@example.com but it returns sqlite3.OperationalError: unable to open database file

            Also trying python3 manage.py changepassword returns the same error.

            Suggestions welcome, Couldn't see anything in their github issues.

            jdaviescoatesJ Online
            jdaviescoatesJ Online
            jdaviescoates
            wrote on last edited by
            #5

            @timconsidine said in Linkding Password reset:

            Purely for the purpose of reserach <cough:, nah, I'm an idiot>, how do you reset the password for Linkding?

            I found 2 places where it looks like you can do it:

            /change-password/

            and

            /admin/auth/user/1/password/

            😉

            I use Cloudron with Gandi & Hetzner

            timconsidineT 1 Reply Last reply
            0
            • jdaviescoatesJ jdaviescoates

              @timconsidine said in Linkding Password reset:

              Purely for the purpose of reserach <cough:, nah, I'm an idiot>, how do you reset the password for Linkding?

              I found 2 places where it looks like you can do it:

              /change-password/

              and

              /admin/auth/user/1/password/

              😉

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by
              #6

              @jdaviescoates hmm, deceptively obvious, but ...

              • the first link requires a valid login
              • the second throws up page Not Found

              But thank you - confirms I am overlooking info.

              1 Reply Last reply
              0
              • timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote on last edited by
                #7

                OK, phew, I'm in again on the original instance.
                There is probably an easier way, but this is the 'hacking' that I did, in case it helps anyone :

                • installed a fresh instance of Linkding on a temporary URL
                • change the default password as instructed
                • launched a terminal and then clicked the Postgres button to launch psql
                • used SELECT * FROM auth_user; to show the raw data for the only user, and copied the hashed password content
                • closed psql and closed the terminal
                • in the original app installation, launched a terminal and launched a psql session
                • updated the auth_user table for the only user with UPDATE auth_user SET password = 'copied_hashed_password_value' WHERE username = 'username';
                • closed psql and terminal
                • refreshed the login page for the original app instance
                • logged in with the known unhashed password set for the user in the dummy app instance
                • killed the dummy app instance
                • for safety I also copied out the values in the bookmark table with \COPY (SELECT * FROM bookmarks_bookmark) TO '/app/data/bookmarks.txt' WITH DELIMITER ',' CSV HEADER;

                Maybe there is an easier way to do all that, but it seems Linkding doesn't provide any maintenance utilities for Postgres (just sqlite using python).

                Goodnight !

                1 Reply Last reply
                1
                • timconsidineT Offline
                  timconsidineT Offline
                  timconsidine
                  App Dev
                  wrote on last edited by
                  #8

                  As some petty revenge for losing access 🤣 I have packaged Shiori for Cloudron :
                  https://forum.cloudron.io/post/74384

                  Hope it helps someone.

                  1 Reply Last reply
                  4
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search