Posted on 12-03-2015 11:05 AM
This feels like i'm missing something simple but I can't put my finger on it. I'm trying to create a local hidden admin account via a policy. The directory we will say is /private/var/USERNAME. With that said, it's not creating the account it's returning a policy error. No issue creating non /private accounts. Any thoughts?
I currently have to deploy a hidden user with a directory and some key files. Yes I could probably do it with a script BUT I can't due to security reasons with the password. So the end results was to push the admin account then push the directory folders to it later.
Solved! Go to Solution.
Posted on 12-03-2015 11:17 AM
@BenL you can use CreateUserPKG (available in Mac App Store) to create a user that is an admin and with a UID below 500. Then a script to create the folders and set permissions properly. So a policy with the PKG and an After script would do the trick. Script could be as simple as:
#!/bin/sh
rm -rf /Path/To/User/Home/*
cp -R /System/Library/User Template/English.lproj/* /Path/To/User/Home/
chown -R <user>:staff /Path/To/User/Home/
Posted on 12-03-2015 11:17 AM
@BenL you can use CreateUserPKG (available in Mac App Store) to create a user that is an admin and with a UID below 500. Then a script to create the folders and set permissions properly. So a policy with the PKG and an After script would do the trick. Script could be as simple as:
#!/bin/sh
rm -rf /Path/To/User/Home/*
cp -R /System/Library/User Template/English.lproj/* /Path/To/User/Home/
chown -R <user>:staff /Path/To/User/Home/
Posted on 12-03-2015 11:32 AM
You may be able to use JAMF's binary to do this.
sudo jamf createAccount
Regards,
TJ
Posted on 12-10-2015 01:22 PM
@stevewood Thanks Steve. I used the app. I was incorrectly told that it didn't work by someone else who tried it that way. I tried it, worked like a charm and I moved the files over. Thanks everyone.