Skip to main content
Answer

Policy to add local account fails, account already exists?

  • October 15, 2021
  • 3 replies
  • 45 views

Forum|alt.badge.img+3

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? 

 

Best answer by Tribruin

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)

3 replies

Forum|alt.badge.img+19
  • Honored Contributor
  • Answer
  • October 15, 2021

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)


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • October 15, 2021

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!


Forum|alt.badge.img+21
  • Valued Contributor
  • October 15, 2021

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!


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.