[英]How to reset Apache Archiva Password
I am using apache-archiva-2.2.0 version.我正在使用 apache-archiva-2.2.0 版本。 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?让我知道如何更改密码?
I've done this by stopping archiva, deleting the users database at data/databases/users
, eg,我通过停止存档,删除data/databases/users
的用户数据库来完成此data/databases/users
,例如,
% 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. Archiva 将重建用户数据库,并在备份时为您提供创建新管理员用户的选项。
If you'd like to disable password expiration entirely, follow the steps at https://serverfault.com/a/840545如果您想完全禁用密码过期,请按照https://serverfault.com/a/840545 中的步骤操作
it is working for me,它对我有用,
following steps,以下步骤,
1 . 1 . open /usr/local/apache-archiva-2.2.3/conf directory then open archiva.xml and change expiration like this打开 /usr/local/apache-archiva-2.2.3/conf 目录然后打开 archiva.xml 并像这样更改过期时间
<expiration>
<enabled>false</enabled>
<days>90</days>
</expiration>
then restart archiva然后重新启动存档
如果您不想删除整个用户数据库,这里有一个非常好的指南: http : //kris-itproblems.blogspot.com/2010/11/apache-archiva-admin-account-locked.html简而言之: 复制用户数据库并使用像 SQuirreL SQL 这样的 Derby 数据库客户端在本地修改它,然后将其复制回来并重新启动 Archiva。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.