The topic I have is about Authentication and Admin. Specifically when someone turns on LDAP syncing or any other authentication method with the Sage X3 admin account. Normally this doesn’t happen but there has be a few cases recently so I thought it would be a good idea to show you all how to easily undo that change for the Admin account. Note that this could technically be applied to any account; we are using Admin because Admin should always be set to basic authentication.
Before we start, you will need to install Robo3T or another GUI based interface for MongoDB. MongoDB is where we’re going and is also where everything that happens in the administration module is stored. Since someone flipped the switch on the admin user, were going to have to use Robo3T to flip it back. This will not change the original password that was setup for the basic authentication. I hope it is not the default password. If it is, you should probably change it (like ASAP). If you want to learn a bit more on navigating Robo3T you can read one of my older blogs here. It covers how to use Robo3T and find stuff in MongoDB.
So, we want to install Robo3T on the same server that MongoDB is installed. You can technically install it anywhere on the network, but for simplicity its just easier if its on the same server. Next you would have to create a connection to MongoDB. I’m not going to cover that, because it can be super complicated if you have SSL certificates, any sort of proxy, DMZ, or any other networking witchcraft. In a simple form, you could just put the server-name (where MongoDB is installed) and the port. The default port is 27017 (but it can be changed so double-check the service to make sure it’s the same port).
Once you’re done creating your connection, go ahead and connect. When connecting you should get a listing of the DB name, and under the name you will see collection directory, and under that you will find the actual collections (or tables).
The total number of collections will vary depending on the Version of Sage X3, Version of MongoDB, and the Version of Syracuse you have installed. Now we will look for the collection called “User” and double click it to load into the right side of the screen. This loads the whole collection and is similar to running a SELECT * FROM in SQL Management Studio.
Once here, we are going to modify the query bar to narrow down the user table listing. I know there is only 4, because that is all I got in there. In a production environment you will most likely have more than 4 users (I hope). So, we are going to change the query
This should only return one document (or record) back. It should look just like my screenshot.
NOTE: If you are getting more than one result, the you have a bigger problem. You may want to look and see if you have multiple ADMIN accounts. If you do you may want to call your local support or business partner as you may have a more problematic issue.
Now we are going to right click on the one document and select Expand Recursively
It should expand out the entire document so we can see all the values. We are looking for the authentication value. Like in my picture below
If you have a value like LDAP, oAuth2, or SAML2 then we are going to remove it. We do this by right click on the open document and selecting Edit Document…
This should open all the values to be edited. Now we can make our change.
Locate the authentication value and we are going to remove the wording. Note, we need to keep the quotations and the trailing coma as they are part of the indication that there is nothing there. And nothing is equal to basic.
So we should be changing it like so.
Once done, click Save.
Now you can close out of Robo3T and you should immediately be able to sign into Sage X3 as the Admin with whatever basic authenticated password you have.