LION: Migration or installation causes UID change of admin account

Originator:sam.stigler
Number:rdar://11777577 Date Originated:6/29/2012
Status:Open Resolved:
Product:Mac OS X Product Version:10.7.4
Classification:Other Bug Reproducible:Sometimes
 
29-Jun-2012 09:18 AM Sam Stigler:
Summary:
On multiple computers, mostly migrations but also one upgrade, the computer's local "admin" account's UID is changed from 501 to 1000. This is however not updated in the account's settings, leading to a situation where the admin user cannot access his or her user-specific Documents, Desktop, Downloads, Library, Movies, Music, and Pictures folders.

Steps to Reproduce:
1. Create an Administrator account with short name "admin" on an older Mac laptop
2. Start up a new-out-of-the-box MacBook Pro (15", early 2011). (Specifically, I've been experiencing the issue on MacBookPro8,2 models.)
3. Go through the first-boot Setup Assistant, select the option to migrate data from Time Machine or other drive, and use a FireWire cable to migrate data via Target Disk Mode from the old computer. Be sure to leave all of the option boxes checked for the migration.
4. Once the Setup Assistant has completed, open up Finder in the newly-migrated admin account and click the Documents, Desktop, etc. folder one-by-one in the sidebar.

Expected Results: You would be able to see the contents of each folder as you clicked on it in the sidebar.

Actual Results: You get a "permission denied" error message when you click on each of those folders. Additionally, other weird behavior results from not having access to the user Library folder -- for example, System Preferences crashes upon launch.

Regression: I have also seen this issue BEFORE a migration, on white MacBook (circa 2006-2008) running Lion v10.7.3.

Notes:
If you choose "Get Info" on one of the affected folders, the permissions section will at the same time first say that you have "No Access" to that folder, and that right below that say that admin has "Read & Write" privileges for it -- yet you're logged in as admin! Finder won't let you recursively apply permissions changes because so far as it knows nothing needs to change.

One workaround is to recursively chmod 777 the entire user folder. However, that opens up numerous security holes.

Issue is fixable by changing the UID of the migrated admin account to 1000 (from 501) in System Preferences > Users & Groups > Advanced Options... (visible by control-clicking on the user account) for the admin user, and then restarting the computer; and finally in Terminal recursively changing the owner of the admin user's home folder to 1000.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!