User accounts in OS X are managed by default through the Accounts system preferences (Users & Groups in Lion), where you can add or remove them, or change properties such as administrator status via a simple interface. However, sometimes if you are trying to delete an account the system may be stubborn and refuse to allow this action, so the account reappears when you next launch the system preferences.
This type of problem generally means the system preferences cannot properly access the system directory, which can happen if corruption or permissions faults occur when you upgrade the operating system software or make other major changes.
If you experience problems when trying to remove accounts on your system, there are several things you can try:
- Check permissions
The first and easiest step is to open Disk Utility and perform a permissions fix on the boot volume: select the boot volume, and click the "repair permissions" button in the First Aid tab. If a permissions fault is making the directory files and folders readable but not allowing edits, then your ability to modify accounts may be affected.
- Try creating a new account
Creating a new account on the affected system may clear problems with the directory, as this will write a new node to the directory and perhaps spur the system to access it properly.
- Use an alternate directory management tool
A last option is to bypass the system preferences when trying to delete a user account, and instead use the Directory Utility tool that Apple provides with OS X, which may be better equipped than the system preferences for managing the directory in some situations.
The Directory Utility is located in the /Macintosh HD/System/Library/CoreServices/ folder, so launch it and then follow this procedure to clear stubborn accounts:
First select the Directory Editor in the utility's toolbar, and then ensure you are viewing the Users in the node "/Local/Default," which will list all of the local users on the system. Then click the little lock icon and authenticate as an administrator. After doing this, you will see a number of users listed, but most of these are system accounts that are used for various services like file sharing, audio management, and authentication management.
In this list you should be able to find the name of the user account you would like to delete. Select it, and then click the minus button to delete it. Confirm that you want to remove the account, and then go to the /Macintosh HD/Users/ directory on the hard drive and remove the user's home folder to finish the deletion process.