Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    ProGet linux commands to setup admin user

    Scheduled Pinned Locked Moved Support
    10 Posts 3 Posters 31 Views
    Loading More Posts
    • 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.
    • I Offline
      itpurchasing_0730
      last edited by

      I am trying to automate the setup of a proget server hosted with docker and was wondering if it is possible to setup the admin user or license key via command line. Is there some documentation anywhere for commands for this verision?

      NanciCaloN 1 Reply Last reply Reply Quote 0
      • NanciCaloN Offline
        NanciCalo inedo-engineer @itpurchasing_0730
        last edited by

        Hello @itpurchasing_0730 ,

        The simplest way to handle this is with some some SQL Commands (i.e. the Native API), after the ProGet database is installed/updated.

        You can execute commands like this:

        docker exec -it inedo-sql /opt/mssql-tools/bin/sqlcmd \
          -S localhost -U SA -P '«YourStrong!Passw0rd»' \
          -Q '«sql command here»'
        

        The commands to run (note you'll need to escape the single-quotes):

        • EXEC Configuration_SetValue 'Licensing.Key', '«your key»'
        • EXEC Users_SetPassword 'Admin', «password-bytes», «salt-bytes»

        «password-bytes» and «salt-bytes» will be hex strings, like 0x0000, and you can find those values by querying the Users table after you've set the admin password to be what you want.

        Hope that helps!

        Cheers,
        Nanci

        1 Reply Last reply Reply Quote 0
        • I Offline
          itpurchasing_0730
          last edited by

          Thanks @NanciCalo! Is there documentation somewhere for all the available commands?

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @itpurchasing_0730
            last edited by

            @itpurchasing_0730 you can find that in /reference/api in your instance; that's the Native API

            1 Reply Last reply Reply Quote 0
            • I Offline
              itpurchasing_0730
              last edited by

              Thanks @atripp! Unfortunately I cant get any of the commands there or those that @NanciCalo mentioned to work. Powershell just returns "Could not find stored procedure". Have you got any troubleshooting steps for me?

              atrippA 1 Reply Last reply Reply Quote 0
              • atrippA Offline
                atripp inedo-engineer @itpurchasing_0730
                last edited by

                @itpurchasing_0730 whoops, look like a parameter was missing (-d to set the database name):

                docker exec -it inedo-sql /opt/mssql-tools/bin/sqlcmd \
                  -S localhost -U SA -P '«YourStrong!Passw0rd»' \
                  -d ProGet -Q '«sql command here»
                

                That should do the trick I hope!

                1 Reply Last reply Reply Quote 0
                • I Offline
                  itpurchasing_0730
                  last edited by

                  @atripp That did it! Thanks so much for your help!

                  1 Reply Last reply Reply Quote 0
                  • I Offline
                    itpurchasing_0730
                    last edited by

                    Hey @atripp, sorry one more question: is is possible to disable the landing page if a user is not logged in? So only an authenticated user can see the feeds/packages etc

                    atrippA 1 Reply Last reply Reply Quote 0
                    • atrippA Offline
                      atripp inedo-engineer @itpurchasing_0730
                      last edited by

                      @itpurchasing_0730 there is; see Advanced > Web.HideHomePageFromAnonymousUser

                      1 Reply Last reply Reply Quote 0
                      • I Offline
                        itpurchasing_0730
                        last edited by

                        Brilliant! Thanks again @atripp!

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post
                        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation