cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to set initial password for admin on 1.2.0 schema 6

gopp
Champ in-the-making
Champ in-the-making
Hi,

I have tested Alfresco and are very pleased with the quality of the product, but found one showstopper for releasing it to production in our company.

It is not possible to set the admin password to anything but "admin".
I did a "DROP DATABASE alfresco", rm -r  alf_data, rm -r work/jboss.web/localhost/alfresco. Then I changed the password in WEB-INF/classes/alfresco/web-client-config.xml, and created the war again. When I log in the password I set is not valid, but "admin" works just fine.

My system is FreeBSD 6.0-RELEASE, JDK1.5.0 native, JBoss 4.0.3SP, and PostgreSQL 8.0.7. I use the "war version" of Alfresco 1.2.0 schema 6

There is no changes to the war except the Hibernate and database url settings to adapt PostgreSQL.

I can post the complete config and logs if needed.

Any thoughts?

Best regard Marius Sorteberg
3 REPLIES 3

steve
Champ in-the-making
Champ in-the-making
Hello,

You can easily change the admin password through the web application.

Once you have logged in, open up the Administration Console (in More Actions), and select Manage System Users.

Search for admin, and there should be a 'change password' action.

Use that to change the password.

Hope that helps,

Steve

andy
Champ on-the-rise
Champ on-the-rise
Hi

I have missed this one ….

The admin password is now set as part of the bootrstrap in

alfresco\bootstrap\alfrescoUserStore.xml

The encoding is

HexEncoding of the MD4 hash of the "UnicodeLittleUnmarked" encoded bytes from the password text.


Here is a quick knock up of the code required:


public class MD4HashGenerator
{

    static
    {
        try
        {
            MessageDigest.getInstance("MD4");
        }
        catch (NoSuchAlgorithmException e)
        {
            Security.addProvider(new CryptixCrypto());
        }
    }

    public MD4HashGenerator()
    {
        super();
    }

    /**
     * @param args
     */
    public static void main(String[] args)
    {

        System.out.println("Hash: " + new String(Hex.encodeHex(md4(args[0]))));

    }

    private static byte[] md4(String input)
    {
        try
        {
            MessageDigest digester = MessageDigest.getInstance("MD4");
            return digester.digest(input.getBytes("UnicodeLittleUnmarked"));
        }
        catch (NoSuchAlgorithmException e)
        {
            throw new RuntimeException(e.getMessage(), e);
        }
        catch (UnsupportedEncodingException e)
        {
            throw new RuntimeException(e.getMessage(), e);
        }
    }

}

You will need the following jars:

cryptix-jce-provider.jar
commons-codec-1.2.jar

I have a handy jar for this …but can find no way of adding it to the forum ….

Regards

Andy

gopp
Champ in-the-making
Champ in-the-making
Thanks for your reply, both methods worked.

– Marius