1.2. External Accounts

External Accounts are similar to Mobile Accounts (which we will cover in Chapter 7). Beyond the fact that the home directory resides on external media, the account operates like a standard account, with the addition of an .account file.

Creating an external account is facilitated by the createmobileaccount command. So rather than letting the operating system decide whether it wants to invoke the createmobileaccount dialog at the loginwindow, we're going to force the issue by manually running the command, which is located in /System/Library/Coreservices/ManagedClient.app/Contents/Resources directory. Note that this is not in your default PATH, meaning you must always type the full path to the command or modify your shell preferences. The -n, -p and -h flags define the username, password and home directory of the account. So assuming your USB drive is called JUMPDRIVE, the following would create an external account on the USB drive:

./createmobileaccount -n mobileadmin -p 'MYSECRETPASSWORD' -h 
/Volumes/JUMPDRIVE/Users/mobileadmin

At this point we're pretty much done. We could also have enabled FileVault by using the -e flag and/or run the command verbosely (great for troubleshooting issues during account creation) by using the -v flag. Now, use ls -al to verify that your new external account can write to the volume.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.140.108