View Issue Details

IDProjectCategoryView StatusLast Update
0000257Bacula-Websecurity-issuepublic2018-07-27 09:15
ReporterPortoAssigned Todavide 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
PlatformServerOSCentos 7.5.1805OS Version7.5.1805
Product Version8.0.1 
Target VersionFixed in Version 
Summary0000257: like Bug#256: after installation can't login
DescriptionHi

After a fresh installation of bacula and bacula-web I'm not able to login, it says 'username or password incorrect'.

CentOS 7.5, Apache 2.2, PHP 7.2, bacula 7.0.5, bacula-web 8.0.1, MariaDB

Running 'php console setupauth' finish with 'Great !!! Apache auth....completed', the .htaccess file is present. I have no error logs from apache, all access logs report code 200, all looks fine. Bacula backup works, I can login to the db, so should bacula-web. But even checks with '.../index.php?test' leads to the login page with the cool bat.. and the uncool message :-(

Does anybody knows a way to overcome the entry door?
Thanks for any help!
TagsNo tags attached.

Activities

davide

2018-07-18 20:11

manager   ~0000820

Last edited: 2018-07-19 10:04

View 2 revisions

Hello,

Can you check SElinux ?

Check application/assets/protected folder permissions

Thanks for your feedback

By the way, you don't need to run
$ php console setupauth


This was useful prior version 8.0.0, but not anymore with version >= 8.0.0

Porto

2018-07-24 13:04

reporter   ~0000821

Hi Davide

SElinux is set to permissive, the folders from ./bacula-web belong to user and group apache.
The folders application, assets have 755, protected 700, the files in it 600.

How do you then configure users?

Thanks!

davide

2018-07-24 13:28

manager   ~0000822

Hi @Porto,

The user table should be created at first run of Bacula-Web, except an uncaught problem occur.

I'll provide you a PHP script which will do this task for you.
I have already plan to offer a wizard to setup everything on first Bacula-Web setup in a next release.
Would you like to be a beta tester for this feature ?

Thanks for your feedback

Porto

2018-07-24 13:55

reporter   ~0000823

I'd feel flattered ;-)

davide

2018-07-24 14:50

manager   ~0000824

So you are now the official upcoming Bacula-Web 9.0 beta tester ! :)

I'll get back to you soon about the script which create the application database back-end.

davide

2018-07-25 12:40

manager   ~0000825

Last edited: 2018-07-25 12:41

View 2 revisions

Hi Porto,

I've written a small PHP script which hopefully, will help me to identify source of your problem
Instructions and script are available here

https://www.bacula-web.org/download/setup-php/

Get back to me with output of the script please

Porto

2018-07-26 17:56

reporter   ~0000826

On a Centos7:

[root@bacula-web]# sudo -u apache php setup.php
Bacula-Web auth setup script

Checking requirements

Ok PHP version
Ok PHP timezone
Ok Protected assets folder is writable
Ok Smarty cache folder write permission
Ok PHP Posix support
Ok PHP PDO support
Ok PHP SQLite support
PDO drivers (available):
         driver: mysql
         driver: odbc
         driver: sqlite
Ok PHP Gettext support
Ok PHP Session support
It's now time to setup the application back-end database

Please note that all informations stored in the user database will be destroyed
Can we proceed ?

Answer (Yes/No): Yes
Let's go !
Deleting application back-end database
Ok Database file removed
Ok Database created
Creating database schema
Ok Database schema created
User creation
Username: admin
Email address: admin@local
Password:
Ok User created

You can now connect to your Bacula-Web instance using provided credentials
[root@bacula-web]#

================================================================
Hi Davide
my time as beta-tester hardly begun, seems to be allready over :-S

want to say: thank you, the script worked perfect!
The dashboard you built is great to have!

davide

2018-07-27 09:14

manager   ~0000827

Hi Porto,

Thanks for your feedback.

I'm happy to know my scripts works and you can use Bacula-Web now :)
I'll include it in next version with some improvements/modifications.

Happy to know you like current dashboard, I'm pretty sure you'll enjoy the dashboard in next major release even more !

P.S: your time as a beta-tester is not finished yet, if you want, you'll test next major release (9.0).

Best regards

davide

2018-07-27 09:15

manager   ~0000828

Problem fixed with setup.php script

Issue History

Date Modified Username Field Change
2018-07-18 15:25 Porto New Issue
2018-07-18 20:09 davide Assigned To => davide
2018-07-18 20:09 davide Status new => assigned
2018-07-18 20:11 davide Status assigned => feedback
2018-07-18 20:11 davide Note Added: 0000820
2018-07-19 10:04 davide Note Edited: 0000820 View Revisions
2018-07-24 13:04 Porto Note Added: 0000821
2018-07-24 13:04 Porto Status feedback => assigned
2018-07-24 13:28 davide Status assigned => feedback
2018-07-24 13:28 davide Note Added: 0000822
2018-07-24 13:55 Porto Note Added: 0000823
2018-07-24 13:55 Porto Status feedback => assigned
2018-07-24 14:50 davide Note Added: 0000824
2018-07-25 12:40 davide Note Added: 0000825
2018-07-25 12:41 davide Note Edited: 0000825 View Revisions
2018-07-25 12:41 davide Status assigned => feedback
2018-07-26 17:56 Porto Note Added: 0000826
2018-07-26 17:56 Porto Status feedback => assigned
2018-07-27 09:14 davide Note Added: 0000827
2018-07-27 09:15 davide Status assigned => resolved
2018-07-27 09:15 davide Resolution open => fixed
2018-07-27 09:15 davide Note Added: 0000828