How to reset Apache Archiva password

I am using apache-archiva-2.2.0 version. I lost my admin password so I want to reset my admin password.

I tried resetting the password by deleting the files below.

./apache-archiva-2.2.0/data/databases/users/dbex.lck

./apache-archiva-2.2.0/data/databases/users/db.lck

But still he asks to reset the password.

Database details -

<New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
  <Arg>jdbc/users</Arg>
  <Arg>
    <New class="org.apache.tomcat.jdbc.pool.DataSource">
      <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDriver</Set>
      <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/users;create=true</Set>
      <Set name="username">sa</Set>
      <Set name="maxActive">20</Set>
      <Set name="removeAbandoned">true</Set>
      <Set name="logAbandoned">true</Set>
      <Set name="initialSize">5</Set>
      <Set name="testOnBorrow">true</Set>
      <Set name="validationQuery">select 1</Set>
    </New>
  </Arg>
</New>

      

Tell me how can I change my password?

+3


source to share


2 answers


I did this by stopping archiva by deleting the user database in data/databases/users

for example

% pwd
/home/archiva/current/data/databases
% mv users{,.old}

      

and then run archiva again.



Archiva will restore the user database and offer you the option to create a new admin user when you back up it.

If you want to completely disable password expiration, follow these steps: https://serverfault.com/a/840545

+9


source


it works for me,

next steps,

1.open directory / usr / local / apache -archiva-2.2.3 / conf, then open archiva.xml file and it will expire like this



<expiration>
        <enabled>false</enabled>
   <days>90</days>
  </expiration>

      

then restart archiva

0


source







All Articles