I'm not sure how you lost your admin account, but you can either add admin privileges to you account or you can create a new admin account. You will need to boot up in single user mode:
This page will tell you how to get into single user mode.
http://support.apple.com/kb/HT1492
Basically, you hold down the command + s key then powering on your machine. The command key has a little apple symbol on the lower left. It is between the alt/option key and the space bar. On a PC keyboard, it will be the windows key, I think.
to change your current id:
The first two commands will depend on your release of Mac OS X. Look at what is typed out in the console to determine the exact format.
# Type the follow two instructions to access the startup disk in read/write. Press return after each command.
# in case of partial success repeat this command until errors go away.
/sbin/fsck -fy
/sbin/mount -uw /
->Start up some utility processes that are needed.
sh /etc/rc
->You will probably need to press the return key once the system stops typing.
figure out what to use as
$username_to_add
ls /Users
replace
$username_to_add with your short user name.
[ not sure if you need sudo in front.
sudo dseditgroup -o edit -a $username_to_add -t user admin
macos - How to add user to a group from Mac OS X command line? - Super User
[ this link shows adding the id to group wheel, but my administrator id is not in group wheel. ]
or you can create a new admin account.
Get the Mac to set up an additional administrative account. You can then change the password on your old account. This will work all all releases of Mac OS X so far.
Start with your computer power off. Hold down command-s. Power on your computer.
Type in the following:
The first two commands will depend on your release of Mac OS X. Look at what is typed out in the console to determine the exact format.
# Type the follow two instructions to access the startup disk in read/write. Press return after each command.
# in case of partial success repeat this command until errors go away.
/sbin/fsck -fy
/sbin/mount -uw /
cd /var/db
pwd
#List all files. The l is a lower case L.
ls -a
#The move command acts as a rename command in this format.
mv -i .applesetupdone .applesetupdone.old
# reboot your mac
shutdown -r now
Once you've done that the computer reboots and it's like the first time you used the machine. Your old accounts are all safe. From there you just change all other account passwords in the account preferences!!