New to using MDS. Right now I have to set up devices with two workflows. One workflow creates and admin account and a standard account. Then, it installs a couple of packages. Second workflow installs scripts. It seems like I have to run the first workflow. Then, sign into both accounts. Then, run the second workflow. This is the only way I’ve been able to get my m1 devices setup in the way that I want them setup.
If I try to use a single workflow to create both accounts, install packages, and run scripts, I end with an admin account (no scripts ran), and a standard account that is missing all of its default directories (Downloads, Documents, ect).
I’ve tried reordering when the scripts run, but it doesn’t seem to help. The only thing that has helped is running the scripts in a separate workflow after the accounts have been created.
Any advice for me? I’ve tested all the scripts individually and they work as intended.
Thanks for your help. Yes, I’m creating an admin and standard user. Then, I’m installing a launch daemon into /Library/LaunchDaemons that runs a script in /usr/local/bin. In the admin account, I’m installing a finder and dock plist, and a few miscellaneous files. In the standard user account, I’m installing a launch agent into ~/Library/LaunchAgents that runs a script in the users home directory. I’m also installing a dock plist and other miscellaneous files into the standard user account. Each installation task is broken up into it us own MDS script. Here’s one of my MDS scripts.
The issue is probably that the user home directories have not been created yet and you are creating some folders. Add “createhomedir -c” at the top of your script to force any users that have directory services accounts to have home directories created.
As for copying items into the home directory, TCC may be protecting some of the folders. I usually modify the user template before users are created then it will use the files added to the template when creating the home directory.
Thanks for the quick response! “createhomedir -c -u teacher” did the trick for my standard user account called teacher, but I’m still having problems with the admin account. Running “createhomedir -c -u admin” didn’t seem to help. Also, where can I read about creating user templates? Sorry for all of the rookie questions. I work for a public school and I’m trying to get M1 MacBooks deployed for my school, but my technical ability is limited. Thanks again for the help that you’ve given me.
Sorry, I got it now. I had “createhomedir -c -u admin” out of order. In my workflow, I adjusted the sequence of my scripts. Now it works!!! Thanks for all of your help.