I'm having a strange problem that is randomly showing up where the admin GROUP is being deleted from the users systems, demoting the local admin account to a standard user. The users are all standard users anyway so they don't notice a thing until they ask a tech to update/install something and the tech can't do it.
I have a fix I can run in terminal to delete the existing admin group, create a new one, and add the admin user to the admin group:
dseditgroup -o delete admin
dseditgroup -o create admin
dscl . -append /Groups/admin GroupMembership admin
Now, I wanted to add this as a self service option so that I don't have to remote into the machine and run this command via terminal, or be able to do it via ARD. But the problem I am having is that the terminal asks for confirmation (are you sure you want to do this? y or n) and I don't know how to skip that question or enter 'y'. Can someone give me a hand?
And has anyone heard of the admin group being deleted from a system randomly? This has never happened before, but now we are using Centrify Direct Control for connecting to AD. Not sure if there is a cause/effect relationship there or not.
Thanks for any help!
Rich Barron
