7 Replies Latest reply on Oct 29, 2015 6:27 AM by cwinning

    Delete credentials

    fcs_rl Rookie

      I'm trying to clean up our credentials library, but I am unable to delete credentials created by other users (predecessors, mainly). How can I remove credentials that were created by a no-longer active account?

        • 1. Re: Delete credentials
          SupportEmployee

          Hi,

           

          The SQL query attached in this document can delete all credentials currently stored in the Protect database:

          SQL query to delete all credentials from Protect database, for logged error: Key not valid for use in specified state

           

          It was designed to help with the error mentioned, but it should work for the purpose of what you want to accomplish.

           

          The reason you can't delete the other credentials via the console is that the credentials are stored per-use which is why you can't delete any credentials added by another user.

           

          Thanks,

          -Adam

          1 of 1 people found this helpful
          • 2. Re: Delete credentials
            fcs_rl Rookie
            Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here. 
            So, the only way to clean up the credentials is to wipe them all out, and start over?

             

            • 3. Re: Delete credentials
              SupportEmployee

              Yeah, with that workaround it will delete all the credentials stored in the database.

               

              Leaving the credentials there won't hurt anything either, but right now there's no way you'll be able to just delete individual credentials that were added by other users.

               

              You could add a request for a feature change here: Shavlik Feature Request Form

               

              Thanks

              -Adam

              1 of 1 people found this helpful
              • 4. Re: Delete credentials
                human Rookie

                Hi Adam,

                 

                I'd like to use the script you've attached but when I click the link I get an  "Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here."

                 

                Are you able to just post the query here in plain text?

                • 5. Re: Delete credentials
                  cwinning CommunityTeam

                  Hello,

                   

                  This hasn't been tested in Protect 9.2:

                   

                  /***********************************************************************************/

                  /*                                  Disclaimer:                                    */

                  /*                                                                                 */

                  /* Executing these SQL Statements is at your own risk. Customers should understand */

                  /* these SQL Statements prior to executing them. Shavlik does not warrant that the */

                  /* SQL Statements will be uninterrupted or error-free. The entire risk as to the   */

                  /* results and performance of the SQL Statement is assumed by person executing the */

                  /* the SQL Statements. Shavlik is not responsible for the damage caused by         */

                  /* executing these SQL Statements.                                                 */

                  /***********************************************************************************/

                  select * into TMPUserCredential from UserCredential

                  go

                  select * into TMPUserCredentialUsage from UserCredentialUsage

                  go

                  delete from UserCredentialUsage

                  go

                  delete from UserCredential

                  go

                   

                  Thanks,

                  Charles

                  1 of 1 people found this helpful
                  • 6. Re: Delete credentials
                    human Rookie

                    Thanks Charles, that fixed my problem and FYI seemed to work fine under 9.2

                    • 7. Re: Delete credentials
                      cwinning CommunityTeam

                      Hello,

                       

                      That's good to know, I would suggest a full backup before running this SQL query just in case.

                       

                      Thanks,

                      Charles