(Please note the following steps I followed, as far as I can tell, are identical to Apple's instructions here: https://support.apple.com/en-us/HT201548 - note that the order in which you'd follow Apple's instructions as of this date is first the "Rename the home folder"
steps 1-4 and then on into "Then rename the account"
and skip the "macOS Ventura or later"
on down to "Earlier versions of macOS"
and follow those steps 1-7. I am posting my question because I do not see a differential that should create the failure that I'm experiencing.)
In macOS 12+ in a scenario where you need to rename an account (including its actual filesystem path/folder name) vs creating a new one and copying things over, why does the following fail by seemingly losing settings and screwing up preferences, etc?:
- Login as another admin user
- Open Terminal.app and
cd /Users/; sudo mv old_shortname new_shortname; sudo ln -s new_shortname old_shortname
- Open
System Preferences
→Users & Groups
- Authenticate / unlock
System Settings
(lock icon) for admin access - Right-click user to rename →
Advanced Options...
- Enter the new
Account name
andFull name
- Enter the new path in the
Home directory
field (eg,/Users/new_shortname
) - Save by pressing
OK
and reboot system
Upon doing the above and adding a symlink in hopes of reducing problems, the user is faced with missing general and app preferences, desktop wallpaper, on and on.
Reverting these changes kinda gets the user back to the way they were with some missing preferences for apps that tried to startup during the attempt and so forth.
What is the proper way to rename a user as desired and in the way it seems as though it should have worked above such that all settings, preferences, etc. are retained?
find . -type l -lname "*old_username*" -exec sh -c 'printf "%s -> %s\n" "$1" "$(readlink "$1")"' _ {} \;
so that's not a huge problem, but again, a simple illustration as to why I think it's a good idea to put a symlink to make access to the old path simple for the beginning of the process. – ylluminate Dec 23 '22 at 09:56dscl
? – nohillside Dec 23 '22 at 18:28Users & Groups
panel at step 3 in my steps above. The only thing I did differently (that Finder doesn't manipulate either) from Apple's steps are the firstRename the home folder
steps 1-4 since I did those in Terminal, but the actual latter steps wherein Apple'sUsers & Groups
pane trigger whatever they trigger (such asdscl
, or whatever else, etc.) in the background are intact as you're suggesting... – ylluminate Dec 23 '22 at 18:32cmd-i
), authenticated (lower right padlock; password of admin user), and then attempted to click the name at the top of the folder to rename and when that did not work, I also clicked the disclosure arrow beside the "Name & Extension" section and the text field that contains the name of the home folder was unable to be selected / changed there either. – ylluminate Dec 25 '22 at 05:06