- After the Installation of some Software like MySQL you can have some
problem with the Automatically Created user. - If you try to add an User or Group from System>Preferences
and you find it already exists but this doesn't permit you to Login on a
Terminal Session.
a) To Delete a User
dscl . -delete /Users/yourUserNameb) To Delete a Group
dscl . -delete /Groups/yourGroupName
After you are Free to Re-Create User and Group from System Preferences.
If You Re-Create User and Group by System Preferences after you Should Repair Ownerships on Directories and Files Owned by the Deleted Users/Groups.
For example if you deleted and recreated "mysql" User and "mysql" Group after you will need to Recursively set ownership by:
sudo chown -R mysql:mysql /usr/local/mysql
Extra Indications:
Mac HOW-TO Make a Command Alias 4 Easy-Quick Execution