G+_Mark Phillips Posted May 28, 2014 Share Posted May 28, 2014 I am trying to write a script in python to add a new standard user to Macbook Air's (I have about 490 to set up this summer). My thought was to have a csv file with the computer serial number, Real Name, username and password in it so it can grab information from that file and use it in the commands to create a new user without having to manually add it. I am a bit stuck and not sure what way to go with this. I am relatively new to coding so this may not be the best language to use and/or the best process to accomplish this task. I figured it couldn't hurt to ask and get some tips. Any help would be wonderful! Thanks! Link to comment Share on other sites More sharing options...
G+_Wesley Kerfoot Posted May 28, 2014 Share Posted May 28, 2014 Hey Mark Phillips there is actually a built-in CSV module that comes with Python (here: https://docs.python.org/2/library/csv.html ) which is fairly simple to use, the docs I linked to explain how to use it. If you have any other questions then I could probably help out! Examples: https://docs.python.org/2/library/csv.html#examples Link to comment Share on other sites More sharing options...
G+_L I Posted May 30, 2014 Share Posted May 30, 2014 here's a Python script for doing it on Linux http://castrascriptorium.wordpress.com/2013/01/29/create-an-easily-extendable-python-script-for-mass-adding-and-erasing-users-in-linux/ and a Bash script for creating users on the Mac commandline http://wiki.freegeek.org/index.php/Mac_OSX_adduser_script I'm sure a Frankenscript combining these two should be possible? Link to comment Share on other sites More sharing options...
Recommended Posts