Help with straightening out users, ownerships, and permissions

Discussion in 'Mac Pro' started by camner, May 28, 2013.

  1. camner macrumors regular

    Joined:
    Jun 19, 2009
    #1
    Quick background:

    1. For many years I had a 2006 Mac Pro which I bought used, so I set up a new user (shortname: robertcamner). Because this was a second user, it had uid=502

    2. Recently, I bought a used 2010 Mac Pro which had an existing user (shortname: MacPro [yes, I know that shortnames are usually all lowercase, but this came with mixed case, and using diskutil list / I have verified that I have a case INsensitive system!]. I decided to use Migration Assistant to migrate my user from the 2006 MP to the 2010. The user MacPro has a uid of 501.

    3. While the migration went smoothly, I had lots of stuff I couldn't access, both on my system volume and other volumes (including external drives), presumably because so many files had a owner uid of 502 and I didn't have a user set up on the new system with that uid. So, I created a second Admin user with exactly the same shortname (robertcamner) as on the 2006, which of course now had uid of 502, so I could access any files by logging in as this second user.

    OK, enough of background!

    This setup is not ideal...it's at best a workaround, since to access the files with the 502 user as owner I have to log in as that user.

    What I'd like to do is this:

    1. Have my primary user (the one with uid=501) have shortname=robertcamner (the shortname of my current 502 user)
    2. change the ownership of all files on internal and external drives to the user with uid=501

    I want to to do this so I get access to all my files (wherever located) with my main user and so that my username is what I want it to be.

    I'm reasonably handy with Terminal, though I'm not that familiar with the various unix commands (I always have to lookup the syntax for what I want to do).

    So, any help with how to do this would be appreciated. I've looked at several articles about changing shortnames/usernames, but I have the added complexity that I want to make the shortname/username of the 501 user the name of the current 502 user (I don't use the 502 user except for accessing files I can't access with the 501 user).

    Two nagging worries:
    1. I have one real ownership oddity on my system volume. When checking which files had which owner on the system volume--using Terminal--I've discovered that the CONTENTS of the Toast Titanium.app--but not the app container itself--has the ownership set to 502, for reasons I can't fathom. See below for example of output from the find / -uid 502 command:
      /Applications/Toast 11 Titanium/.DS_Store
      /Applications/Toast 11 Titanium/Toast Titanium.app/Contents/Frameworks/AS_Storage.framework/AS_Storage
      /Applications/Toast 11 Titanium/Toast Titanium.app/Contents/Frameworks/AS_Storage.framework/Resources
      /Applications/Toast 11 Titanium/Toast Titanium.app/Contents/Frameworks/AS_Storage.framework/Versions/Current
      /Applications/Toast 11 Titanium/Toast Titanium.app/Contents/Frameworks/GData.framework/GData
      /Applications/Toast 11 Titanium/Toast Titanium.app/Contents/Frameworks/GData.framework/Resources
      /Applications/Toast 11 Titanium/Toast Titanium.app/Contents/Frameworks/GData.framework/Versions/Current

    2. Time Machine...Because the TM backups span the time of the migration from the 2006 to the 2010 machine, many of the backups there have ownership set to the 502 user. That hasn't caused me any headaches (yet...), but I don't know if this is something I need to worry about.

    Thanks in advance for your help.
     
  2. deconstruct60 macrumors 604

    Joined:
    Mar 10, 2009
    #2
    Quick background on more straightforward ways of doing this, that still would work if willing to "start over".


    Unless had a non-mainstream (commericial) license, the Mac Pro should have come with OS media. So doing a clean install will solve most of the 'problem'.

    A clean install also means any security ( backdoors, etc. ) and funky drivers ( a Banana Jr 3400 device driver from 2005 ) aren't either current or future problems. If trying to keep the old OS because "free software" that came with it ... again it is short term gain and likely long term problems.



    HFS+ is case insensitive by default. This has little significant to do with usernames short or long. You can't have another user directory named "macpro" but that really isn't a big deal since it is bad Unix practice anyway.


    If have a small number of Macs ( 2-3) as long as create the users in the same order each time then will have a consistant set of UID numbers. For example if create an "Administrator" account first and then a small set of 2-3 users in the same order you will end up with 501-503 or 501-504 the same on all of the macs. Moving external drives won't have UID mismatch problems.

    No; at least for the external drives. Most likely the files are UID 501 on the external drive ( if created with the other Macs which have a single user account). The print name of the files are completely immaterial. Those files are marked UID 501. What user friendly print name is used on a system for 501 can vary from system to system if moving the drive around. That "name" isn't stored anywhere in the file's metadata.

    Most likely you are having problems because logged in as UID 502 and trying to access and/or change files that have 501 only privileges.


    Change your 502 user to something other than this.
    a. Login as 501 user with Admin privledges.
    b. System Preferences -> Accounts
    c. click lock icon to authenticate
    d. control-click on the 502 user. Change shortname to something else ( rctemp )

    Since "rctemp" is technically an Admin also can logout and do the same for 501 (i.e., to robertcamner ) while logged in as 502 .

    Next flip the home directories. Log back in as the renamed 501. I'm going to assume that running latest version of OS X where new user accounts all belong to the group staff by default. if have migrated a relatively old user account from much earlier OS X days then each account may have belonged to its own group.


    Run the following in terminal

    sudo chown -R 501 /Users/robertcamner

    Which changes the ownership of all the files in and that directory itself to be owned by 501.

    Go to System Pref accounts advanced and change the home dir for 501 ( while logged in as 501) to be /Users/robertcamner

    Probably want to change to password of 501 to what you had for 502.

    You can keep the old "MacPro" homedir in case there is something needed. Before you delete user 502 probably should change its home dir to something else. ( I'm not sure if OS X tries to "clean up" when delete a user with the GUI utilities. )



    Not sure what kind of installer that Toast users but either they tagged the files as 502 ( not that uncommon to just have an admin user that is just used for admin and all normal work done as 502. ). If you didn't install and Toast uses normal "copy to Applications folder" install method that there could have been a 502 user on the box previously.


    TM may duplicate them as "new" files when do the large chown. (depends upon where and how it is tracking the file metadata changes ). That would be OK since it will throw old ones away eventually. You may want to manually tell TM to chuck that old stuff if it does do a massive duplication.
     
  3. camner thread starter macrumors regular

    Joined:
    Jun 19, 2009
    #3
    @deconstruct60: Thank you VERY much for your detailed reply; it must have taken you a while to type all that out. It was very clear and perfect for my level of understanding....

    I'll give it a whirl today (and yes, I will make a clone of my system volume before mucking around with Terminal! :cool: )
     
  4. elvisizer macrumors 6502

    Joined:
    May 29, 2003
    Location:
    San Jose
    #4
    yeah, decontruct's instructions are good- glad to see the suggestion to change the UID's around, that's definitely a good way to handle this type of situation.
    also, about deleting users from the GUI- OS X will ask you what to do with the user's home directory- you can either leave it as is, delete it, secure delete it, or save it to a disk image.
     
  5. cocomama macrumors newbie

    Joined:
    Sep 7, 2013
    #5
    Home UID

    I took over a macbook pro from a co-worker and have been using it with his home UID. I would like to change the 'name' that he used to set up the computer. I have tried selecting the user and then control/click to see the details. But when I go to change the name of the home UID - it wants me to set up a whole new user. Is it possible to change the home UID name without changing anything else?
    Thanks in advance.
     
  6. m4v3r1ck, Apr 26, 2014
    Last edited: Apr 27, 2014

    m4v3r1ck macrumors 68020

    m4v3r1ck

    Joined:
    Nov 2, 2011
    Location:
    The Netherlands
    #6
    Thanks guys for this GREAT thread!!! You just saved my bacon(s)! :D
     

Share This Page