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
-
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?
-
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, like0x0000
, and you can find those values by querying theUsers
table after you've set the admin password to be what you want.Hope that helps!
Cheers,
Nanci
-
Thanks @NanciCalo! Is there documentation somewhere for all the available commands?
-
@itpurchasing_0730 you can find that in
/reference/api
in your instance; that's the Native API
-
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?
-
@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!
-
@atripp That did it! Thanks so much for your help!
-
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
-
@itpurchasing_0730 there is; see Advanced > Web.HideHomePageFromAnonymousUser
-
Brilliant! Thanks again @atripp!