How to recreate default Admin user and to bootstrap creds? [Video]

How to recreate default Admin user and to bootstrap creds? [Video]

AuthorFullName__c
Prasanna Narayana
articleNumber
000004922
ft:sourceType
Salesforce
FirstPublishedDate
2020-11-18T11:40:00Z
lastModifiedDate
2024-03-10T07:47:15Z
VersionNumber
6

Recreating Admin and bootstrapping creds.



 

Video Transcript:

Hi, everyone. This is Prasanna from Jfrog’s support. In this short video, we’ll be looking at how to recreate an admin user in case you’ve lost the password for your existing admin account. And this would be a two-part video. In the first part, we’ll be discussing the steps that you need to follow for a regular installation type, so there’s a Linux installation or a Docker type. In the second part, we’ll be looking at the steps needed for Helm installation, so let’s get started.

So here I have an Artifactory installer, an RPM instance, as we can see the version is 7.10.2 currently. So I’m already logged in with an admin user. So right now let’s say we want to change the admin user part or the credentials for the admin user. So the steps we need to follow are already provided in our Wiki page. So we can quickly search for that by searching for Artifactory and we get admin user, you can open up this link and here are the steps for that. So have you following the same steps on my test installation? So let’s go.

The first step would be to create a bootstrap.creds file under Jfrog home Artifactory var etc access. So let’s see, here I’m logged into my Artifactory instance. Let me log in back again. Okay. So let me quickly check the service status. Okay. So it is up and running and this is the same instance that we see in the browser. So now let’s go ahead with the steps to restore the creds that would be first to create a bootstrap.creds file in this location. So this would be slash opt Jfrog home and then we need to head into Artifactory var pixie and then access. So in here, I’d have to get through X is for this, then set to opt JFrog Artifactory var etc and then access. There you go.

So in here we need to create a file called bootstrap.creds, so let’s copy the filename bootstrap.creds. And as for the content, so as mentioned here, we need to populate the field, file with the below content. You can create the file with multiple administrators as well. So for now, let’s go ahead with a single admin user, since I am restoring access to an existing admin account and changing the username to admin instead of admin1, and after at is we see a start here. So this will mean access for all the IP addresses. So if you have any specific IP address, you can mention that here and now, let’s go ahead and change the password to something different. Let’s say password 123.

So this would be all that’s needed to add in the content of the filing. So we just need to add the username and Ibis that it has access to and the password. So now let’s go ahead and save this file. Now the next step, we need to give it the relevant permissions so we can just copy the permissions that are required and then that should be it, and the last step would be to restart our Artifactory service. So that it restarts access service, and then the new admin password would track into your Artifactory instance. So let’s go ahead and do that. So we can use the same steps for any other Linux patient relations such as a Devin installation, or a zip installation and also the same steps exist for a local installation. We can just log back into the container inside the Docker container. We can hit with the same directory and then we can go ahead and at the bootstrap.creds and then do a restart. So let me start it back up again.

So we can also tail the Artifactory service logs while restarting up. So there’ve been more when it has completed starting. JFrog Artifactory log then tail. As we can see Artifactory service initialization is completed. It should be able to see Artifactory instance in the UI and let’s go ahead and refresh this page. Yeah, back to the login page right now, let me go ahead and opt the admin user and type in the new password that is password 123. Then as we can see, you will be able to login. So this is how you can restore the admin access for regular installation. Now let’s move on to the second part of the video where we try this with the Helm installation type or Kubernetes installation. So currently I have an Artifactory instance running on a Kubernetes cluster. So I have installed it using Helm, and this is the command that I used to install Artifactory using Helm. So now let’s go ahead and get the IP address. Maybe we can access this instance and here we go, so let me type in the existing admin password.

So currently I have the password set to password two, as we can see, we do have a couple of Artifacts and we are able to login, so now let’s go ahead with the restriction steps for Helm installation. Let me first log out. Okay. So the steps are a little bit different in this case. So for this, let’s go to our Helm charts data page. So if we head into the charts data page and we do have steps mentioned here, so let’s search for bootstrap, bootstrapping Artifactory admin password. So these are the steps we need to follow to recreate the admin user. So the first thing would be to create the admincreds-values.yaml. So I already gone ahead and created that here.

So in this, these are the contents that we need to specify. So it comes under Artifactory configuration and then in admin, here’s the IP range. This is where we added star in the previous recreation Bush under Jason file. So we can add start here. That would mean it’s open for all IP, and then we can add the admin user and then we can add the password as well. So now let’s go ahead and change this, change the password. So currently it’s a password two. Let me change it to password 123. The next step would be to apply this admincreds-values.yaml file into your existing Helm solution.

So this is that two step to do that since I have installed it with the default password and master key, I’m going to have to add those as well as part of the command. So here’s how my command looks like to upgrade and add this values.yaml file. So as we can see, here is when passing the bootstrap file, and these are the other parameters that we need to set for that it recognize the purpose equal version, and we are not upgrading the database. And this is the push for sequel password. All those might not be necessary, but just in my case, I would have to add this. So let’s go ahead with the command to operate the Artifactory admin password.

So this for actually install, upgrade the Artifactory engines, and then it would have to restart the pods. So once it’s done, we can, watch the pods to check in the restart is agreeing. By the way, we can also check that the installation name that I have is test pro Artifactory so we can get pods or we can watch on the get pods so that we can check the Artifactory engine that’s spinning up or that’s up updating right now. As we can see does this is initializing right now, you could also tell the logs get pods. It’s running the live tails so that we know when the Artifactory started up. So currently it looks like it’s waiting for the postgresql connection. It looks like, it was able to get the connection and it’s proceeding the startup. As you can see, I have version 7.10.2 in here as well. So access has started up, you just have to wait for Artifactory instance to start up next. Yep. Its like the router has started up now.

Yeah, as we can see the Artifactory in service initialization completed, just to check lets exit out of the tail kubectl get pods. Make sure all our pods, putting into this installation is up and running. Okay. Not yet. Lets through a watch on this. Yeah. Artifactory instance is up, we just upgrade for the engine instance for startup, so that we’ll be able to access.

Lets quickly check our UI. I took it’s already started up. Yep. There we go. And also check the service to get the IP or mutations installation that is test pro Artifactory. As we can see test pro factory. This is like, these are 04, 199, 114.98. Yep. Here we go. Now lets try to access the admin user with the new password, password 123. Here we go, so these are the steps to follow, to reset the admin user or to recreate the admin user in what the installation types. Hope this helps and that’s the end of the video. See you guys.