Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

2 users with same User ID, Big Problems

I currently have User A from macbook 1 (old user I no longer use) and User B from macbook 2 and 3 (new user I've been using for ~4 years).


I had upgraded from macbook 1 to 2 to 3 and am currently running 10.9.5


I thought I had deleted User A through Finder a couple months ago. Since then I've been having mild annoying issues


- ppt crashes in slideshow

- quicktime player won't open

- installer doesn't work most of the time

- sometimes, my current user B will randomly switch to user A while my computer is on

- Some applications will randomly complain they can't open because they can't find User A's directory.


I ran dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]' and found


name: A

password: ************

uid: 501

gid: 20

dir: /Users/A

shell: /bin/bash

--

--

name: B

password: ************

uid: 501

gid: 20

dir: /Users/B


Running the command . -list /groups GroupMembership | grep user

returns nothing for user A and returns the following for user B:


_appserveradm B

_appserverusr B

_lpadmin B

admin root B

com.apple.sharepoint.group.1 B


I'm at my wit's end here. I tried using console to debug the reason behind why certain applications crash and the common theme seems to be "com.apple.launchd.peruser.501: (......................................) Could not setup Mach task special port 8: (os/kern) invalid argument"

MacBook Pro, OS X Mavericks (10.9.5)

Posted on Feb 26, 2015 10:46 AM

Reply
10 replies

Feb 26, 2015 11:05 AM in response to agarcia59

The simple answer…


Back up the Mac, erase the internal disk, reinstall OS X, use Migration Assistant to move the user data back. It will give the users new user ID's & set the correct permissions on their files. You can reinstall apps to put the OS into a 'known good state'. Personally I would avoid migrating apps & 'other files' so that apps can be clean installed.

I do not know how you could have two users with the same UID in open directory. Clearly the Mac has issues & it is unclear to me how you got into this state.

I do not know if the error you list is explicitly related to the users, however it can't be good having the UID the same.

Take several backups if you have the space for it, ideally you want a full bootable clone, do you know how to do that?

Feb 26, 2015 12:08 PM in response to Linc Davis

I cannot delete the unwanted user through Users & Groups, even though I am logged in as User B (admin), I cannot delete user A.


I first have to go through terminal, change the UID and GID, and at that point, I can delete the user through Users & Groups, but it didn't seem to make a difference. I tried giving my main user all permissions afterwards, but must have messed something up because I was then unable to use anything on my computer. Had to install my recent backup to get back to step 1.

Really at a loss here...

Feb 26, 2015 12:22 PM in response to agarcia59

How are you editing the UID in Terminal?


Erase & reinstall sounds ominous, but it will undo the mess.


You can also restore users without Migration Assistant…


Erase, reinstall then create an admin user.

Login as the admin

Now copy the User's home folders from a backup into /Users - ensure the home folders have unique names with no spaces (e.g. suitable 'short names').

A Finder copy is OK since it will allow you to authenticate (no need for Terminal).

Open System Preferences, create two new users supplying the same short name as the home folders. The OS will repair permissions on the folders & set the UID's correctly.

When you supply the correct short name there will be a dialog asking about reusing the existing home folders.



Maybe Linc Davis has a better way to fix the OS as it currently is, so keep us updated on how you want to proceed.

Feb 26, 2015 12:36 PM in response to Drew Reece

sudo dscl . -change /Users/A UniqueID 501 1234

sudo dscl . -change /Users/A PrimaryGroupID 20 21



This changes the users ID and GID.


If I understand correctly;


-Erase my current SSD

-Install 10.9

-Create admin user

-Copy my old home folders from my backup into my new /Users folders

--When you say "short names", you mean "Applications", "Desktop", "Documents", etc., right?

- I don't understand the need to create 2 new users. So I will have 1 admin and 2 other users with the same permissions?




Thanks for taking the time to help me out.

Feb 26, 2015 1:23 PM in response to agarcia59

agarcia59 wrote:


-Copy my old home folders from my backup into my new /Users folders

--When you say "short names", you mean "Applications", "Desktop", "Documents", etc., right?

- I don't understand the need to create 2 new users. So I will have 1 admin and 2 other users with the same permissions?


No I do not mean Applications or the other items. 'short name' is used for the home folder name, notice how the account has a 'full name' field in System Preferences. The home folder uses a shortened version without spaces.


I was assuming you wanted users A & B, hence the suggestion for 2 accounts in addition to an admin. You wan't to avoid giving them the same ID or permissions, the OS handles that for you when you create accounts correctly in System Preferences.

Mar 3, 2015 10:09 AM in response to agarcia59

Hi Drew and Linc


Drew, I see what you were going for, but I only wanted 1 user. I tried doing both your methods and am unfortunately still having the same issue.


I found a old working backup on an computer of mine and am comparing the users on that computer and this one. After running dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]'


my current computer shows:


name: losercasename

password: *************

uid: 501

gid: 20

dir: /Users/lowercasename

shell: /bin/bash

--

--

name: macports

password: *

uid: 502

gid: 501

dir: /opt/local/var/macports/home

shell: /usr/bin/false

--

--

name: messagebus

password: *

uid: 500

gid: 500

dir: /var/empty


I don't know who macports and messagebus are, they don't seem to show up in users & groups...


My old working backup shows the following.


name: UPPERCASENAME

password: *************

uid: 501

gid: 20

dir: /Users/UPPERCASENAME

shell: /bin/bash


I could move the working backup to my current computer, but It's over a year old (lots of new info on my current computer, it would be a huge pain to manually move everything over.


Does the appearance of macports and messagebus users in my current glitchy computer an issue? Why don't these users show up in my old functional computer?



Thanks for your help.

Mar 3, 2015 2:09 PM in response to agarcia59

agarcia59 wrote:


Hi Drew and Linc


Drew, I see what you were going for, but I only wanted 1 user. I tried doing both your methods and am unfortunately still having the same issue.


I found a old working backup on an computer of mine and am comparing the users on that computer and this one. After running dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]'


my current computer shows:


… (not relevant info)


I could move the working backup to my current computer, but It's over a year old (lots of new info on my current computer, it would be a huge pain to manually move everything over.


Does the appearance of macports and messagebus users in my current glitchy computer an issue? Why don't these users show up in my old functional computer?



Thanks for your help.


You tried both methods? So when you tried my method of erasing & reinstalling the OS it failed did it? You then restored this old broken OS back to the Mac? Be honest – you didn't erase & reinstall did you?



Stop messing around in Terminal, backup, erase, reinstall, migrate the users you need by hand. It is incredibly simple if you stop getting distracted by Terminal.


I don't see why you have to bring another computer with an old backup that you do not want to use into this issue! Stop 'thinking around' the issue at hand.

Linc's method should have resolved this unless the OS was in a complete mess (which seems likely considering your desire to fool around in Terminal).

The Macports user is from the software you installed, message bus is also likely to be from something else you installed (possibly via macports). Neither should effect the logged in user.


It's looking like you are intent on playing with the OS (or more specifically playing in Terminal until things work), I can't bear to watch.


Backup, erase the internal disk & move the users home folders to /Users in Finder (NO TERMINAL NEEDED) & re-add that user in Users & groups.

If you need help with that I will explain (again), but you can continue messing in Terminal with things you already broke & don't understand in your own time.

2 users with same User ID, Big Problems

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.