Policy to add local account fails, account already exists?

jaycruz145
New Contributor III

Hi all, 

 

First off, thank you all for helping me so far with basic questions, I finally got access to the Composer app and it's been so much easier to deploy packages and whatnot. 🙂

 

I'm trying to use the built in policy option for creating a local account for backdoor access, to have users be able to access their machine in case of a password issue, etc. Two accounts get created, CompanyUser (for the user to be able to access) and CompanyAdmin (which I have forgotten the password to). I have a script that hides the account in the /private/var/CompanyUser (or /private/var/CompanyAdmin respectively) and that works fine, but when running this script it gives and error on the part when it goes to create the users: Error creating user: An account with the user name CompanyAdmin already exists.. When I go to the /private/var/ folder, no such user directories are present. Hmm. Odd. I try logging in to the users from the login screen (I only currently know the password to the CompanyUser account) and it works! I see that a CompanyUser folder gets created in the /private/var folder. How do I clear both accounts out and get this policy to run correctly now? 

 

1 ACCEPTED SOLUTION

Tribruin
Valued Contributor II

Have you run 

dscl . list /Users

and see if CompanyAdmin already exists? Could it be this account is being created somewhere else (Prestage or as the Jamf management account)

View solution in original post

3 REPLIES 3

Tribruin
Valued Contributor II

Have you run 

dscl . list /Users

and see if CompanyAdmin already exists? Could it be this account is being created somewhere else (Prestage or as the Jamf management account)

jaycruz145
New Contributor III

Yup, thats what it was, a User Enrollment Management account already created the Admin account. My bad. I wish you could audit and find out who made these changes and when. Maybe I did and forgot lol. Thank you!

jcarr
Release Candidate Programs Tester

Click the 'History' button in the PreStage.  That will show you who/when and details for changes as long as they are in your log flushing window.