To change the password on Ubuntu 18 you need to open a terminal and enter the following command:
$ passwd [settings] [user_name]
To change the password for another user, you need to log in as superuser:
$ sudo passwd user
Here user is the user for whom you want to change the password in Ubuntu.
You can delete the password in Linux for a user, then the user will not be able to log in.
$ sudo passwd -d user