What you need to do is to edit the file
nano /dspace/config/local.cfg.EXAMPLE
change the db.password = with the password you entered twice after the command:
createuser -U postgres -d -A -P dspace
save the changes to file local.cfg.EXAMPLE and save it as local.cfg, then run
the command
sudo
Let me put in the whole section:
test_database:
[java] 2020-02-11 11:50:18,422 WARN
org.dspace.services.email.EmailServiceImpl
@ Couldn't get an email session from environment: Need to specify class
name in environment or system property, or as an applet parameter, or in an
application