Opened 3 years ago

Closed 3 years ago

#11643 closed Bug/Something is broken (fixed)

Cannot delete user account

Reported by: https://id.mayfirst.org/masspiratesweb Owned by: https://id.mayfirst.org/srevilak
Priority: Medium Component: Tech
Keywords: Cc: srevilak
Sensitive: no

Description

Hi! I created the voteaaronjames.masspirates.org hosting order, but the user name I used was not unique and I got an error on the user account page:

Failed to create the new user. The the command was /usr/sbin/useradd -u '26053' -g '5824' -d '/home/members/masspirateparty/sites/voteaaronjames.masspirates.org/users/ajjames' -c ' ' -s '/bin/false' -p 'XXXXXXXXX' -m 'ajjames' 2>&1 The output was: useradd: UID 26053 is not unique.

I was able to create a new user name for this hosting order, update all of the entries to use this new user and delete all of the references to the old user.

However, when I try to delete the old user it fails with:

Error! 2016-04-06 20:29:53 You cannot delete a record that is already deleted or has a status set to error or pending. Please wait until the status changes to make your change. If the status is set to soft-error, please read the error message and re-edit your record to fix it. Then, if you want, you can delete it. If the status is set to hard-error please notify support.

I did try to delete the user a few times before removing all of the references and got this error:

Error! 2016-04-06 20:28:44 This user account is being used in another service. Please check all the service tabs and delete any corresponding records first.

How can I delete the user that got the error and why was this not flagged as an invalid user earlier?

Change History (5)

comment:1 Changed 3 years ago by https://id.mayfirst.org/masspiratesweb

  • Cc srevilak added

comment:2 Changed 3 years ago by https://id.mayfirst.org/srevilak

  • Owner set to https://id.mayfirst.org/srevilak
  • Status changed from new to assigned

comment:3 Changed 3 years ago by https://id.mayfirst.org/jamie

Hi Steve - this sounds like some control panel wonkiness. I see that you assigned to yourself - but let me know if you want some help sorting it out. I can put some work into it on monday. Should be easy to resolve for your user, but I'm always interested in digging deeper to try to understand why it happened so we can fix it permanently.

comment:4 Changed 3 years ago by https://id.mayfirst.org/srevilak

  • Resolution set to fixed
  • Status changed from assigned to feedback

This may have been a concurrency/race condition. The hard error stated that user creation failed because "uid 26053 is not unique". When I examined floriberto's passwd file, I noticed that uid 26053 belonged to ajjames; the same username mentioned in the hard error. User ajjames's passwd file attributes matched the ones mentioned in the failed useradd command.

I suspect that the same useradd command may have been run twice, and the second one lost.

Following instructions in wiki:faq/support/red-fix-hard-error, I set the appropriate item_id to pending-restore and ran /usr/local/share/red/node/sbin/red-node-update on floriberto. This cleared the hard error in the control panel.

comment:5 Changed 3 years ago by automatic

  • Status changed from feedback to closed

No news is good news (we hope)! Given the lack of feedback, we think this ticket can be closed.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.