Hi everybody! Many months ago I had a (luckily rare) problem with my Mac, and part of the solution involved setting up a brand-new user and abandoning my old User ID. I had to manually copy over a lot of files and preferences, but eventually things settled down and worked smoothly again.
I occasionally get a situation that requires me to change permissions on a folder that still 'belongs' to my old user ID, but this is increasingly rare. It is, however, annoying - as is the appearance of two user ID's with slightly different names. I'd like to delete the old username/ID, just to tidy things up, but I'm wondering if I'm asking for trouble. System Preferences (Users section) tells me that deleted users' files will be saved in a 'Deleted Users' folder, but I'm wondering if this is enough, or if I will muck things up by deleting a user who is still the 'owner' of who-knows-how-many files and/or folders on my system. What happens to the ownership of such items when the user who owns them is deleted from the system? I'd just like to check in with the experts before I take what might be a drastic manoeuvre.
You can add different types of user profiles -- known as accounts -- to Mac OS X. David Paul Morris/Getty Images News/Getty Images. For the hint, try to use something only the new user will understand; alternatively, leave this field blank. Click Create User or Create Account. Delete a user. From the Apple menu, select System Preferences. From the View menu, select Users & Groups (Mac OS X 10.7 and later) or Accounts (Mac OS X 10.6 and earlier).
Thanks in advance for your advice! 'I occasionally get a situation that requires me to change permissions on a folder that still 'belongs' to my old user ID.
I'd like to delete the old username/ID. I'm asking for trouble(?)' If the files and / or folders are within a user's 'Home' folder, and that user's account is deleted - so are the files and / or folders. If the files and / or folders are elsewhere (other then within the user's 'Home' folder), and that user's account is deleted - the files and / or folders will remain. 'What happens to the ownership of such items when the user who owns them is deleted from the system?'
, the items 'owner' changes to '(unknown)'.
You might be happy to note that other than the ability to interpret new payloads, the profiles command mostly stays the same in El Capitan, from Yosemite. You can still export profiles from Apple Configurator or Profile Manager (or some of the 3rd party MDM tools). You can then install profiles by just opening them and installing. Once profiles are installed on a Mac, mdmclient, a binary located in /usr/libexec will process changes such as wiping a system that has been FileVaulted (note you need to FileVault if you want to wipe an OS X Lion client computer). /System/Library/LaunchDaemons and /System/Library/LaunchAgents has a mdmclient daemon and agent respectively that start it up automatically. This, along with all of the operators remains static from 10.10. To script profile deployment, administrators can add and remove configuration profiles using the new /usr/bin/profiles command.
To see all profiles, aggregated, use the profiles command with just the -P option: /usr/bin/profiles -P As with managed preferences (and piggy backing on managed preferences for that matter), configuration profiles can be assigned to users or computers. To see just user profiles, use the -L option: /usr/bin/profiles -L You can remove all profiles using -D: /usr/bin/profiles -D The -I option installs profiles and the -R removes profiles. Use -p to indicate the profile is from a server or -F to indicate it’s source is a file.
To remove a profile: /usr/bin/profiles -R -F /tmp/HawkeyesTrickshot.mobileconfig To remove one from a server: /usr/bin/profiles -R -p com.WestCoastAvengers.HawkeyesTrickshot The following installs HawkeyesTrickshot.mobileconfig from /tmp: /usr/bin/profiles -I -F /tmp/HawkeyesTrickshot.mobileconfig If created in Profile Manager: /usr/bin/profiles -I -p com.WestCoastAvengers.HawkeyesTrickshot You can configure profiles to install at the next boot, rather than immediately. Use the -s to define a startup profile and take note that if it fails, the profile will attempt to install at each subsequent reboot until installed. To use the command, simply add a -s then the -F for the profile and the -f to automatically confirm, as follows (and I like to throw in a -v usually for good measure): profiles -s -F /Profiles/SuperAwesome.mobileconfig -f -v And that’s it. Nice and easy and you now have profiles that only activate when a computer is started up. As of OS X Yosemite, the dscl command got extensions for dealing with profiles as well. These include the available MCX Profile Extensions: -profileimport -profiledelete -profilelist optArgs
-profileexport -profilehelp To list all profiles from an Open Directory object, use -profilelist.
To run, follow the dscl command with -u to specify a user, -P to specify the password for the user, then the IP address of the OD server (or name of the AD object), then the profilelist verb, then the relative path. Assuming a username of diradmin for the directory, a password of moonknight and then cedge user: dscl -u diradmin -P moonknight 192.168.210.201 profilelist /LDAPv3/127.0.0.1/Users/cedge To delete that information for the given user, swap the profilelist extension with profiledelete: dscl -u diradmin -P apple 192.168.210.201 profilelist /LDAPv3/127.0.0.1/Users/cedge If you would rather export all information to a directory called ProfileExports on the root of the drive: dscl -u diradmin -P moonknight 192.168.210.201 profileexport. All -o /ProfileExports In Yosemite we got a few new options (these are all still in 10.11 with no new operators), such as -H which shows whether a profile was installed, -z to define a removal password and -o to output a file path for removal information.