@orchard800 As @Moem mentioned, the code you set to unlock your device (pin or password) becomes the password for your user.

Ubuntu Touch is set up like regular Ubuntu with a locked root account and the main user with sudo privileges. So doing things like su - will not work. If you really need to start a root session (not for using apt, that is not supported) you could do sudo su - instead.

What happened to you was that you set up a pin via the GUI, and then went and changed that to an alphanumeric password from the command line. Since the GUI still thinks you have a numeric password it presents to you the numeric keypad for easier entry. This leaves you with no way to enter the other characters of your password, effectively locking you out of your device via the GUI. (ADB access might still have been possible if you had set that up previously.)

The takeaway is this: if you want increased security, set a password via the settings, not a pin.

Having said that, a change is in the pipeline to allow setting of longer pins than the four digits that is currently the case.