If you can boot it to single user mode
niutil -appendprop . /groups/admin users yourusernamehere
Would add your username to the admin group - niutil worked at least in 10.4..
dscl / -append /Groups/admin GroupMembership yourusernamehere
Should work in 10.5.
Also this might work --- if you can boot to single user mode...
http://osxdaily.com/2007/10/29/how-t...-with-leopard/
When restarting the Mac, if it doesn't want to go to single user mode, reset PRAM (command + alt + p + r pressed down together right after pressing power button until you hear the second time the 'bling' then release) , then try again to single user (command + s) and the above.