Visit my.sonatype.com for documentation on Nexus Repository version 2.
If you had the user's email address set properly (and the smtp configuration set properly), you could click login in the UI and select forgot password, enter the username and email address, and a new password will be sent to you. If you do not have email setup properly, you will need to manually edit the security.xml file, located in (nexus-basedir)/../sonatype-work/nexus/conf/security.xml.
- Stop Nexus Repository 2
- Edit (nexus-basedir)/../sonatype-work/nexus/conf/security.xml
- find the <user> object that has a <id> of admin
- change the <password> to
f865b53623b121fd34ee5426c792e5c33af8c227
- Make sure the user has an active status:
<status>active</status>
- Save the file and start Nexus Repository 2
This will give the admin user a password of admin123 (the default) and you will again be able to log in as admin user with the password admin123.
Note: The above applies to Nexus Repository 2.4 and earlier. For Nexus Repository 2.5 and later the admin123 password hash is:
$shiro1$SHA-512$1024$G+rxqm4Qw5/J54twR6BrSQ==$2ZUS4aBHbGGZkNzLugcQqhea7uPOXhoY4kugop4r4oSAYlJTyJ9RyZYLuFBmNzDr16Ii1Q+O6Mn1QpyBA1QphA==
Note: In order for this to work the XML security realm must be installed. It likely is, since it ships by default, but sometimes people remove it. If you're still having trouble check "sonatype-work/nexus/conf/security-configuration.xml" and make sure the realms list has the following two lines:
<realms>
<realm>XmlAuthenticatingRealm</realm>
<realm>XmlAuthorizingRealm</realm>
...
</realms>