Search code examples
authenticationbacula

Bareos error: Sorry, can not authenticate. Wrong username and/or password


I wanted to give Bareos (Open Source Data Protection) a go to see how it works and performs. However I cannot even get past the basic installation and get it working...

I followed the following installation tutorial (several times now): https://www.svennd.be/installing-bareos-on-centos-7/

But I am getting every time the following error: Sorry, can not authenticate. Wrong username and/or password.

I don't understand what I am doing wrong. I even tried using the previous version of Bareos 16.2, but that didn't make a difference and I experience the same issue. I am 200% sure the password and username are correct.

I also consulted the logs:

17-Mar 13:00 bareos-dir JobId 0: Fatal error: Authorization key rejected by Console USERNAME.
Please see http://doc.bareos.org/master/html/bareos-manual-main-reference.html#AuthorizationErrors for help.
17-Mar 13:00 bareos-dir: ERROR in authenticate.c:283 Unable to authenticate console "USERNAME" at client:127.0.0.1:9101

I checked that page (also several times) and even made sure the (user)names/passwords were correct. But still I get the message "Sorry, can not authenticate. Wrong username and/or password." when I try to login on "bareos-webui".

Probably I am doing something wrong, but I cannot disover what.

I have the following files available. Maybe I need to make certain changes to those as well?

  • /etc/bareos/bareos-dir.d/director/bareos-dir.conf
  • /etc/bareos/bareos-fd.d/director/bareos-dir.conf
  • /etc/bareos/bareos-sd.d/director/bareos-dir.conf
  • /etc/bareos/bconsole.conf
  • /etc/bareos/bareos-sd.d/storage/bareos-sd.conf
  • /etc/bareos/bareos-dir.d/client/bareos-fd.conf
  • /etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf

When I compared some files, they have different passwords in them?

For example: /etc/bareos/bareos-fd.d/director/bareos-dir.conf

Director {
  Name = bareos-dir
  Password = "J36zN1mQVF5lLA/FP0kASo+X9wTo8D988nsVqZjx"
  Description = "Allow the configured Director to access this file daemon."
}

And /etc/bareos/bareos-sd.d/director/bareos-dir.conf

Director {
  Name = bareos-dir
  Password = "PAU/ov3RvnFp0I59brd4d8u9m8ejRpkVE7P/4Qz3"
  Description = "Director, who is permitted to contact this storage daemon."
}

And (one more example): /etc/bareos/bconsole.conf

# Bareos User Agent (or Console) Configuration File

Director {
  Name = bareos-dir
  address = localhost
  Password = "Fs5JnyO1ypBhcR0D9CNkx3gynPMa+jmp7sj9Ghst"
  Description = "Bareos Console credentials for local Director"
}

They all have different passwords here? As I understand it, from the online docs, they should all be the same, right?

Maybe that's the issue? Hopefully someone can explain things a bit better or advice me what to do in order to get this working... Maybe it's something simple that I may overlooked?

FYI: I whitelisted all IP's and ports I use on this server.

//small edit

I re-read the documents once again and it says: "The default configuration files are automatically defined for correct authorization with random passwords. If you add to or modify these files, you will need to take care to keep them consistent."

So if I didn't change a thing, it should have worked in the first place, right? So I think something else is wrong here?


Solution

  • Well I finally found the issue...

    Apparently my username or password was to difficult for Bareos to accept. Don't know exactly which one it was, but either username or password caused issues.

    I used as a username something like:

    BCKPserver
    

    And the password I used was similar to:

    !!!!RNDpassW222####
    

    For some reason Bareos saved the password (in the console) and was displayed correctly in the configuration files, HOWEVER it didn't allow me to login on the bareos-webui!

    Solved. Hopefully this will help someone else.