Using MDS Variables for User Account Creation

Hey peeps,

Simple question: is it possible to use MDS’s variables (mds_var1, etc) in the user account creation process, such as using using mds_var1 for the first name and mds_var2 for the last name? Thanks!

Sort of? You can’t currently use it with the built in method, but you could create your own script to create a user based on those variables, and add it in. Might make for a good sample script.

tim

That’s the way I’ve been doing it. Didn’t know if there was built-in functionality that I was missing. Thanks!

Interesting! I was just thinking in doing that but honestly no idea yet how to archive it. Can you share the script you are using for the user account creation? This is going to simplify my deployment process a lot! :slight_smile:

I’d be happy to. Here is a github link with some configuration instructions: https://github.com/popltree2/user_creation_with_mds

Thank you! I will add this to my deployment next week :smile:

1 Like

Hi there, Probably i shouldt be posting here but in separate topic, but if there is one similar already i will try to :wink: I have created a similar script few days ago and it worked, script after installation fetched mds_vars correctly and it created user like it should, but after i reinstalled mac, downloaded installer again, and created new workflow same as previous one, my script doesnt fetch those variables as it should… I was wondering if between my reinstall and downloading MDS there happen to be any update and something went wrong that my script doesnt wokr or is it only my problem ? If so, any hints on that ? In simple words, im even checking those vars with echo and nothing appears :confused:

The way variables work is that the installer stores them in NVRAM and then sets them at the start of each script. The last script then deletes them from NVRAM. You can see them if you run “nvram -p”

tim

Well, i managed to fix my issue. There are 2 arrows just next to the script folder shown in the app, and while i set the script to be executed before installation of packages (that i actually dont have) variables are placed correctly, but if I dont set that order variables are nor present. Speaking of which, it would be nice if one of those built in variables were not plaintext, for example for user creation password :slight_smile:

What would you recommend? Just obscuring with base64?

tim