How to reset Apache Archiva Password

谁都会走 提交于 2019-12-07 02:21:38

问题


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

I tried to reset the password through remove the below mentioned files.

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

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

But still it's asking for password post restart the service.

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>

Let me know how can I change the password?


回答1:


I've done this by stopping archiva, deleting the users database at data/databases/users, e.g.,

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

and then starting archiva again.

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

If you'd like to disable password expiration entirely, follow the steps at https://serverfault.com/a/840545




回答2:


it is working for me,

following steps,

1 . open /usr/local/apache-archiva-2.2.3/conf directory then open archiva.xml and change expiration like this

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

then restart archiva



来源:https://stackoverflow.com/questions/42950840/how-to-reset-apache-archiva-password

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!