I've unlocked the Users & Groups preferences pane, nevertheless I'm unable to select the user "username" for deletion. How can I delete the account?
Best Answer
Was username the first account created? If so, that account has links to OS services that will prevent it from being deleted (though you could hide it). If this is the case and you really want it gone, you can reassign the GeneratedUID from that account to your preferred account and then delete the original. For detailed instructions on how to do this, see Ambrose Little's site.
To add on to the existing answers and offer a different solution, you can securely erase the drive instead of just one user account.
If you want to sell your machine but also include installed software, there is a better way to set this up that will ensure none of your personal data is on the machine, as well as provide a better box opening experience for your buyer.
I would suggest doing a secure erase of your hard disk first.
Then, reinstall your OS.
Configure a dummy user account named "test" or "admin" or something generic
mount -uw / (This mounts the root volume so you can make changes to it.
rm /var/db/.AppleSetupDone (This removes the flag that tells Setup
Assistant that it's done)
rm /var/db/dslocal/nodes/Default/users/"shortname".plist (Replace "shortname" with the user account name you set up before. This removes the user plist)
rm -rf /Users/shortname (Replace "shortname" with the user account name you set up before. This removes the User directory)
Verify that your machine starts up to the Setup Assistant and you're done. That way, your buyer can start up the machine to the Setup Assistant and still retain the software you want to provide them with.
Best Answer
Was
username
the first account created? If so, that account has links to OS services that will prevent it from being deleted (though you could hide it). If this is the case and you really want it gone, you can reassign theGeneratedUID
from that account to your preferred account and then delete the original. For detailed instructions on how to do this, see Ambrose Little's site.