AnsweredAssumed Answered

Random delete of Administrator users

Question asked by erictice on May 8, 2009
I ran into an interesting issue where, for seemingly no reason, all of the users I had in the Administrator Group no longer worked.  I was not able to login with them and when they where searched for to change the password, the message was that they had been deleted or didn't exist. 

On the login screen I would get an "Unable to login - unknown username/password" message.

No configuration changes had been made and at no time did I go in and delete them.  They still were visible in the list when you did a show all users.

I am running Alfresco 3.0 Labs, on the embedded Tomcat, on a RedHat 4 linux with MySQL 5.0 as the db.  I have the content store on a separate SAN box and MySQL is also on a different box then Alfresco.  It had been working fine.

To fix the issue, I had to do the following (fortunately the other users still worked):

1) Open the authority-services-context.xml in the <alfresco home>/tomcat/webapps/alfresco/WEB-INF/classes/alfresco directory and add one of the users that I was able to login with as an admin under the following:

<property name="adminUsers">^M
            <set>^M
                        <value>admin</value>^M
                        <value>administrator</value>^M
                     <!– Add additional user name here –>
                </set>^M
        </property>^M

2) Save the file and restart alfresco.
3) Then after restarting the server, login as that user.  You will now be an admin user. 
4) Navigate to Data Dictionary -> Scripts and add content as a javascript similar to the following:
var badUser = people.getPerson("username") ;
badUser.remove();

5) Add each user you need to reset here.
6) Once it is created go into the content or space details and choose to run action.  Choose the script you just created.
7) Once the user(s) are deleted.  Go to the admin console and recreate them. 
8) Once the user(s) are created.  Go to Manage Groups and add them back to the Administrator Group.

This worked for me. It was a weird thing to happen as I am the only one that knows the users and their password at this point, and no changes to the configuration where made.  I found a similar issue posted for version 2.1 of Alfresco but the solution was not helpful.  I hope this helps if anyone finds themselves in this situation.

Outcomes