Depends a bit on what you messed with.
You can activate the admin account by typing sudo passwd root.
That creates a password for user root, which is the admin user of linux.
if that fails, try to append the boot option init=/bin/bash to the bootloader (read its (online) manual about how to add arguments/options to the bootloader commandline), and start ubuntu with it.
After that, type passwd root to repeat the processs.
restart ubuntu afterwards.
Now you can login as root with the command su in konsole.
As root, try to fix the permissions of the users you mangled with.
Regards, Rinse