Remove unwanted user, group and ID.
Can this be posted as a user tip in my name? I am unable to post to user tips.
After a recent aborted MacPorts install on OS X 10.5.8 I followed MacPorts uninstall instructions at:
http://guide.macports.org/chunked/installing.macports.uninstalling.html
The uninstall worked well except that I was left with a user called 'macports' with ID 503 which showed up when adding a user in Get Info or using AppleJack. I was not able to remove this user in System Preferences/Accounts nor add another user with the same name.
I eventually discovered that this could be resolved by removing the following as root:
/private/var/db/dslocal/nodes/Default/users/macports.plist
/private/var/db/dslocal/nodes/Default/groups/macports.plist
This has removed MacPorts and ID 503 from Get Info and AppleJack and I can now create a new user called MacPorts in System Preferences/Accounts despite the remaining historic entries in /private/var/db/dslocal/indices/Default/index.
I assume this will work in non-MacPorts situations where the user cannot be removed in System Preferences/Accounts.
This will probably work in all versions of Leopard and some later OSs.
Mac OS X (10.5.8), Two 733 MHz G4s with Leopard !