Posted on 10-27-2014 09:19 AM
In our 10.10 workflow we have our local admin created via the createusrpkg from the app store (or the github link). i've noticed that in 10.9 the local admin has admin rights, but in 10.10 it doesn't. anybody else run into that?
Posted on 10-27-2014 09:39 AM
Known issue: https://github.com/MagerValp/CreateUserPkg/issues/38
Posted on 10-27-2014 09:45 AM
@jwojda, are you imaging via Casper? Have you tried creating a management user in a config in Casper imaging?
Posted on 10-27-2014 10:06 AM
@bentoms i use that for the deployment account that only I have the info for. This is for the local admin that the tech's use.
I upgraded to the 1.2.4 and checked the users & groups and it listed as admin...didn't do much more than that for testing though.
Posted on 01-18-2015 09:42 PM
I'm having the same issue using CreatUserPkg (1.2.4) user account packages.
I'm deploying them as part of a Computer Configuration task running from Casper Imaging, via an external SSD, connected to brand new, never booted Macbook Airs.
I have 3 user accounts that were created as "Administrator" accounts using CreateUserPkg (1.2.4)
The accounts and the rest of the configuration are deployed OK, but when I check the local user accounts in System Preferences all of them have been created as "Standard".
If I take one of the same packages and run it manually on a previously booted & configured 10.10.1 Macbook Air, it creates the accounts successfully as "Administrator", so it doesn't appear to be a problem with any of the CreateUserPkg packages themselves, more how they are attempting to be installed as part of the Casper configuration?
Posted on 01-19-2015 02:28 AM
If its 10.10 don't forget you can use the built-in sysadminctl command which works nicely:
sysadminctl -addUser localadmin -fullName “Local Admin” -UID 499 -password “apassword” -home /Users/localadmin -admin
Posted on 01-19-2015 02:05 PM
Thanks for that davidacland, I didn't know about sysadminctl, cheers.
Sorry to ask, but I'm very new to Mac management, and Casper, but how do I call this as part of the Casper configuration? Do I save the above command you provided (edited to suit my environment) and save it as a shell script, then add that to my configuration?
Thanks again.
Posted on 01-19-2015 03:27 PM
@jevans76 for the command posted above, a bash script would be best.
Posted on 01-19-2015 03:46 PM
I don't know how to write bash scripts. I checked the Script repository here, but creating a user account might be too basic for anyone on here to feel the need to upload an example.
Could anyone help?
All I need is:
Local User account: student1 - Admin user
Local User Account: student2 - Admin User
Local User Account: Sysop - Hidden Admin User (ie ID 499)
Posted on 01-19-2015 04:15 PM
@jevans76
something like the following would work (there are better ways to do this with less commands..)
#!/bin/sh
########################################################################
# Created By: Ross Derewianko
# Creation Date: Jan 2015
# Last modified: January, 19 2015
# Brief Description: Creates three user accounts
########################################################################
osxversion=$(sw_vers -productVersion | awk -F '.' '{print $1 "." $2}')
#add users with password of "apassword"
sysadminctl -addUser student1 -fullName “Student 1” -UID 499 -password “apassword” -home /Users/student1 -admin
sysadminctl -addUser student2 -fullName “Student 2” -UID 498 -password “apassword” -home /Users/student2 -admin
sysadminctl -addUser sysop -fullName “Local Admin” -UID 497 -password “apassword” -home /Users/sysop -admin
#check os version and hides sysop.
#checks for 10.10 if not, runs the other command
if [[ "$osxversion" == "10.10" ]]; then
#if osx 10.10 then run
dscl . create /Users/sysop IsHidden 1
else
#if osx not 10.10 run
defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add sysop
fi
exit 0
Posted on 01-19-2015 06:12 PM
Thank you, Thank you, Thank you!!
You have saved my bacon!!
I edited the script to replace "apassword" with the passwords I wished to use for the accounts, then on the JSS web console went to:
Computer Management => Scripts => New - and pasted the script in to it.
I then created a test Configuration workflow that only runs the script, and booted a brand new Macbook from an External drive with Casper imaging on it. I manually selected the Configuration and manually ran the test Configuration workflow.
The first time it ran through none of the accounts were not created. I discovered the trick was to:
Update: Also realised I can set this via right clicking the script in Casper Admin and selecting "Change script priorities"
Once I'd done this and run the Configuration workflow, the Macbook Air rebooted and displayed the two student accounts on the log in screen, and the Sysop account is available to log on with, but not visible.
I know it seems a simple thing to most users on this forum, but I was really stuck on it for a few days once I couldn't get CreateUserPkg to automate this process for me.
People like you who are happy to share their knowledge and help others are what makes a community , so thanks so much once again, very appreciated.
Posted on 01-19-2015 07:36 PM
I had this issue as well with CreateUserPkg 1.2.4 applying admin acct directly after the OS 10.10 (non booted image created with AutoDMG) in Casper Imaging. I then moved install of admin account to after reboot and the admin account worked as expected.
Posted on 01-20-2015 12:10 PM
I'm just wondering why you'd use createuserpkg when installing an OS via Casper Imaging as you can create an Admin account as part of the confg or as as JSS policy called via a postflight script.
Posted on 01-20-2015 01:16 PM
@Chris_Holm][/url - I can see where I can make a script run after reboot, but how do I get a package to run after reboot in a JSS Configuration workflow?
@bentoms][/url][/url - I found the option to create user accounts in Casper imaging, but it doesn't appear to be a solution for mass deployment when booting from an external HDD.
Every time I boot another new Macbook from the external HDD with Casper Imaging on it, I have to re-create the accounts manually all over again before I start imaging.
I'm not going to create three user accounts manually on 280 machines. Have you found a way to get the "Create user account" info to "stick" so it isn't lost when Casper Imaging is closed?
Posted on 01-20-2015 08:08 PM
@jevans76][/url - When in modifying options for a package in admin, in the Options tab of the information window there is an option to install on boot drive after imaging. Not certain how to attach a picture here or i'd show you. Hope that helps. -Oh and this is Chris just on my corporate account. :}
Posted on 01-21-2015 01:41 PM
@jamfqintl - If I right click a package in Casper Admin, I can set the priority, but there isn't any option to "Install on boot drive after imaging"? I'm running Casper Admin 9.62, would that make a difference?
Posted on 01-21-2015 01:46 PM
D'oh, just figured out you meant the Admin console for the JSS, rather than Casper Admin.
For those of you playing along at home, it's:
Computer Management => Packages => <Packagename> => Options Tab => Install on boot drive after imaging
Thanks again Chris : )