How can I regain an admin account on my iMac? I have seen this question several times but no clear answer. I changed the password on the admin user account and It saved it as a standard user. I just bought the Mac so I’m a newbie.


I have tried booting into single user mode so I can creat another admin user but my wireless keyboard driver isn’t loading quick enough before it boots up. 
I have also tried changing the password using command+R and when I get to sign in with Apple ID it says not connected to internet and won’t let me do that either. 


Any help would be greatly appreciated.
I was able to do this in Recovery mode, not single-user. In Recovery mode, you are not started up from your normal system volume, so files are not at their usual paths. 

I had to go into terminal and type 

rm /Volumes/"Macintosh HD"/var/db/.AppleSetupDone 


Note: that if your main volume is named something other than "Macintosh HD", you need to substitute that at the appropriate place; also, there must be a space after "rm" and cannot be one before ".AppleSetupDone".

Also, standard dscl commands will not work as expected in Recovery mode. Once done exit terminal and restart. Upon restart I was able to select a new user with admin privilege. 

What a beating !!