View Issue Details

IDProjectCategoryView StatusLast Update
0000256Bacula-Websecurity-issuepublic2018-09-16 10:01
Reporterjimbo67Assigned Todavide 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version8.0.1 
Target VersionFixed in Version 
Summary0000256: cant login on new install
DescriptionI have just setup bacula-web on centos7. I can connect to the web interface, but cant login. I have tried admin/bacula, the credentials that bacula users for mysql, and no credentials. Just keep getting bad username or password.

I dont see a Users table in my mysql database, and I see an empty Users table in application/assets/protected

Nothing in the docs show that I need to create a user, so I'm a bit baffled. Do I need to manually add a user to the sqlite db? My bacula sw is running in mysql and I configure the connection details in the config/config.php? I tried running "php console setupauth" but I get a "PHP Fatal error: Call to undefined function password_hash() in /opt/bacula-web/console on line 96", and that seems to be some requirement for php5.5

Any guidance on getting past this?
TagsNo tags attached.

Activities

davide

2018-07-11 21:19

manager   ~0000808

Hello,
Default user should be created automatically.

Can you check assets/protected folder permissions ?

Web server log could be helpful too.

jimbo67

2018-07-11 22:40

reporter   ~0000809

assets/protected folder is 755 and owned by apache with group root.. I did a chmod -r on the whole bacula folder to apache
I stopped the httpd daemon, cleared the logs, and started it backup, then tried to login. Here are the results of the access log
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/index.php HTTP/1.1" 200 4716
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/vendor/twbs/bootstrap/dist/css/bootstrap.min.css HTTP/1.1" 200 121200
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/vendor/novus/nvd3/build/nv.d3.css HTTP/1.1" 200 12011
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/vendor/components/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css HTTP/1.1" 200 7785
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/application/assets/css/default.css HTTP/1.1" 200 1115
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/vendor/components/font-awesome/css/font-awesome.min.css HTTP/1.1" 200 31000
[11/Jul/2018:15:38:39 -0500] "GET /bacula-web/vendor/twbs/bootstrap/dist/css/bootstrap-theme.min.css HTTP/1.1" 200 23409
[11/Jul/2018:15:38:43 -0500] "POST /bacula-web/index.php HTTP/1.1" 200 4757
[11/Jul/2018:15:38:43 -0500] "GET /bacula-web/vendor/twbs/bootstrap/dist/css/bootstrap.min.css HTTP/1.1" 200 121200
[11/Jul/2018:15:38:43 -0500] "GET /bacula-web/vendor/twbs/bootstrap/dist/css/bootstrap-theme.min.css HTTP/1.1" 200 23409
[11/Jul/2018:15:38:43 -0500] "GET /bacula-web/vendor/components/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css HTTP/1.1" 200 7785
[11/Jul/2018:15:38:43 -0500] "GET /bacula-web/application/assets/css/default.css HTTP/1.1" 200 1115
[11/Jul/2018:15:38:43 -0500] "GET /bacula-web/vendor/components/font-awesome/css/font-awesome.min.css HTTP/1.1" 200 31000
[11/Jul/2018:15:38:43 -0500] "GET /bacula-web/vendor/novus/nvd3/build/nv.d3.css HTTP/1.1" 200 12011

jimbo67

2018-07-11 22:41

reporter   ~0000810

here is the httpd errors log

Jul 11 15:38:13.475591 2018] [core:notice] [pid 4510] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
Jul 11 15:38:13.476815 2018] [suexec:notice] [pid 4510] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Jul 11 15:38:13.502091 2018] [auth_digest:notice] [pid 4510] AH01757: generating secret for digest authentication ...
Jul 11 15:38:13.502879 2018] [lbmethod_heartbeat:notice] [pid 4510] AH02282: No slotmem from mod_heartmonitor
Jul 11 15:38:13.528463 2018] [mpm_prefork:notice] [pid 4510] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 configured -- resuming normal operations
Jul 11 15:38:13.528487 2018] [core:notice] [pid 4510] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

davide

2018-07-11 22:45

manager   ~0000811

You have SeLinux enabled

Disable it and try again please

jimbo67

2018-07-11 22:52

reporter   ~0000812

Its set to permissive
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

jimbo67

2018-07-11 22:55

reporter   ~0000813

Is there a php script I can run to create the user?

davide

2018-07-11 22:58

manager   ~0000814

I can provide you a PHP script tomorrow, thanks for your patience

davide

2018-07-11 23:01

manager   ~0000815

$ php -v output ?

jimbo67

2018-07-11 23:04

reporter   ~0000816

php -v
PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies


Thanks for the help. Heading out today anyway.

davide

2018-07-12 12:18

manager   ~0000817

Hi,
Sorry but you need at least PHP 5.6.

Check Bacula-Web requirements here -> http://docs.bacula-web.org/en/latest/02_install/requirements.html#install-requirements

There's a lot a rpm repo providing PHP 5.6 or 7.x for Centos 7.
If you need further help, don't hesitate.

Best regards

jimbo67

2018-07-16 15:45

reporter   ~0000818

I loaded php 5.6 and its working now. Guess I should have checked the requirements :-(

davide

2018-09-16 10:01

manager   ~0000859

PHP >= 5.6 was required, nothing else to do.

Closing this bug report.

Best regards

Issue History

Date Modified Username Field Change
2018-07-11 17:21 jimbo67 New Issue
2018-07-11 21:17 davide Assigned To => davide
2018-07-11 21:17 davide Status new => assigned
2018-07-11 21:19 davide Note Added: 0000808
2018-07-11 22:40 jimbo67 Note Added: 0000809
2018-07-11 22:41 jimbo67 Note Added: 0000810
2018-07-11 22:45 davide Status assigned => feedback
2018-07-11 22:45 davide Note Added: 0000811
2018-07-11 22:52 jimbo67 Note Added: 0000812
2018-07-11 22:52 jimbo67 Status feedback => assigned
2018-07-11 22:55 jimbo67 Note Added: 0000813
2018-07-11 22:58 davide Note Added: 0000814
2018-07-11 23:01 davide Status assigned => feedback
2018-07-11 23:01 davide Note Added: 0000815
2018-07-11 23:04 jimbo67 Note Added: 0000816
2018-07-11 23:04 jimbo67 Status feedback => assigned
2018-07-12 12:18 davide Note Added: 0000817
2018-07-16 15:45 jimbo67 Note Added: 0000818
2018-09-16 10:01 davide Status assigned => resolved
2018-09-16 10:01 davide Resolution open => no change required
2018-09-16 10:01 davide Note Added: 0000859