Wrong credentials via script

Hello, I am very new to ODB so please forgive my asking.
I am able to connect via console to my DB and execute a backup manually, but I receive the following error while executing the same commands (and using the same credentials) via shell script.
Error: com.orientechnologies.orient.core.exception.OSecurityAccessException: User or password not valid for database:
The script looks like this
#!/bin/bash
/opt/orientdb/bin/shutdown.sh
/opt/orientdb/bin/console.sh << EOF
connect plocal:/opt/orientdb/databases/mydb admin mypassword
backup database …/backup/backup-mydb.zip
exit;
EOF
Any advice?

I solved by adding a new user.
Anyway the behaviour I described looks very strange to me.