cancel
Showing results for 
Search instead for 
Did you mean: 

Error when i try delete user

aleks_sh
Champ in-the-making
Champ in-the-making
Hi
I am trying to delete a user at administration console
but see this error :
[img]http://files.shamanov.net/files/bug_reports/del_users.jpg[/img]

No external authentication mechanism is used.

Is there a way to view a list of objects assotiated with the person (which i try to delete)?
alfresco.log and catalina.out are clear.
9 REPLIES 9

jbaldo
Champ in-the-making
Champ in-the-making
I'm getting these:

# Unable to delete the User object associated with the Person. This is not an error if an external authentication mechanism such as NTLM was previously active.
# Failed to delete User due to error: org.alfresco.repo.security.authentication.AuthenticationException: 06300002 User name does not exist:

- 3.2 Nightly Build, July 14, 2009
- Using ldap user and group for Synch, not Auth
- Synching with AD server, uid mapped to sAMAccountName
- NTLM for CIFS, not Auth
- user name can login successfully
- user listed in default admin list in config files
- attempted to deleted while logged in as admin


what am I missing?

paulg
Champ in-the-making
Champ in-the-making
I get a similar error message when attempting to delete some (but not all) users.  In other words, I have been able to delete some users.  There are two users that I cannot delete. I am using 3.2 Labs.  Any ideas?

    * Unable to delete the User object associated with the Person. This is not an error if an external authentication mechanism such as NTLM was previously active.
    * Failed to delete User due to error: org.alfresco.repo.security.authentication.AuthenticationException: 07120003 User name does not exist: klister


I am using the internal alf user/person store.  Initially, I thought that maybe the lucene indices were corrupted.  I have rebuilt the indices.  Still getting this User name does not exist error.

dward
Champ on-the-rise
Champ on-the-rise
You are experiencing https://issues.alfresco.com/jira/browse/ALFCOM-3278 .

A fix for this has been checked in to HEAD, revision 15658.

micyks
Champ in-the-making
Champ in-the-making
Hi,

I had similar problem on my installation of alfresco and in my case the problem was that I had person objects in repository but doen't have user object in user store. I didn't use any other authentication than alfresco.

Solution to my problem was that I just deleted person nodes from repository using java code (actually it was webservice api). Maybe it will help…

Thanks

dward
Champ on-the-rise
Champ on-the-rise
I don't recommend manually deleting person nodes, as there is other housekeeping performed by the PersonService when you delete a person.

The fix is in the latest nightly build

http://dev.alfresco.com/downloads/nightly/dist/

paulg
Champ in-the-making
Champ in-the-making
I tried the nightly build (3.3) as suggested and I was able to delete one of the corrupted users.  However, I was unable to delete another corrupted user - getting the same error message as before.

Is there any documentation that someone could point me to that describes the various structures that need to get fixed up in order to really delete a person/user?  Or should I plow through the java code?


…UPDATE:  After looking at the Javascript for personDelete, I just went ahead and created a custom WebScript that brute force deletes that corrupted Person from the repo using GET.  That approach appears to have worked…although I would imagine that there are some remnants of the user/person somewhere.

dward
Champ on-the-rise
Champ on-the-rise
No, do not try to delete a user by other means or you will corrupt your repository.

The nightly build is rather old as a follow-up fix was made to this on 20th August. Until our RM team manage to get all the unit tests to pass, you will need to build from HEAD.

gvbsvv
Champ in-the-making
Champ in-the-making
When I try delete user, I am getting below error. I am using 3.00 version.
A system error happened during the operation: could not delete: [org.alfresco.repo.domain.hibernate.DbAuthorityImpl#65]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.alfresco.repo.domain.hibernate.DbAuthorityImpl#65]
Thanks in advance.
Regards

fast3r
Champ on-the-rise
Champ on-the-rise
I've implemented a custom script to manually delete corrupted users with no User object in the repo.
Here is it:

// JavaScript Document

// inserisci nel seguente array, tra virgolette e eparati da una virgola, i nomi utente da cancellare
var toDelete = new Array("pippo", "pluto", "rfrgfvdgv");


// logging
var logFile = space.childByNamePath("ghostusers.txt");
var log = "";   

if (logFile == null)
{
   logFile = space.createFile("ghostusers.txt");
}

log += "\r\n" + getDate() + "Lancio script ghostusers…\r\n";

try
{

    // Non ci sono utenti
    if (toDelete.length==0) log += getDate() + "Nessun utente da cancellare\r\n";
   
    // elimina utenti
    for (var i=0; i<toDelete.length; i++)
    {
   
      var personToDelete = people.getPerson(toDelete[i]);
     
      if (personToDelete != null) {
     
          // array di gruppi a cui appartiene l'utente
          var container_groups = people.getContainerGroups(personToDelete);
         
          // STEP 1 - Rimuove l'utente dai gruppi
          for (var j=0; j<container_groups.length; j++)
          {
              log += getDate() + getUserlog(toDelete[i]) + "Elimino utente dal gruppo " + container_groups[j].getName() + "\r\n";
              try
              {
                people.removeAuthority(container_groups[j], personToDelete);             
              }
              catch (ex)
              {
                 log += getDate() + getUserlog(toDelete[i]) + "Eccezione in removeAuthority: " + ex.name + ": " + ex.message + "\r\n";
              }
          }       
         
          // STEP 2 - Cancella il componente Person
          log += getDate() + getUserlog(toDelete[i]) + "Elimino componente Person di " + toDelete[i] + "\r\n";
          try
          {  
            people.deletePerson(toDelete[i]);
          }
          catch (ex)
          {
              log += getDate() + getUserlog(toDelete[i]) + "Eccezione in deletePerson: " + ex.name + ": " + ex.message + "\r\n";
          }
     
      }
      // il componente Person non esiste
      else
      {
          log += getDate() + getUserlog(toDelete[i]) + "ERR: il componente Person di " + toDelete[i] + " non esiste!\r\n";
      }
   
    }

}
catch (ex)
{
  // logga eccezione
  log += getDate() + "Eccezione generale: " + ex.name + ": " + ex.message + "\r\n";
}

// aggiunge al logfile
if (logFile != null) logFile.content += log;




function getDate() {

  var data = new Date();
  var minuti = data.getMinutes();
  if (minuti < 10) minuti = "0" + minuti;
 
  return data.getDate() + "/" + (data.getMonth()+1) + "/" + data.getFullYear() + " " + data.getHours() + ":" + minuti + "\t";

}


function getUserlog(username) {

return "USER: " + username + "\t";

}

Main JS API calls are:
people.deletePerson()
people.removeAuthority()  (for each group the user is belonging to)

Is there more data that needs to be deleted to avoid repository corruption?