MHMDhub / enterprise-log-search-and-archive

Automatically exported from code.google.com/p/enterprise-log-search-and-archive
0 stars 0 forks source link

invalid prepopulated values for user system #99

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

In User.pm is prepopulating the system account, and missing some required fields
namely email and preferences.

if ($self->username eq 'system'){
        $self->uid(1);
        $self->is_admin(1);
        $self->permissions({
            class_id => {
                0 => 1,
            },
            host_id => {
                0 => 1,
            },
            program_id => {
                0 => 1,
            },
            node_id => {
                0 => 1,
            },
            filter => '',
        });
        return $self;
    }
by adding before the return it allows the system account to work properly.

        $self->email('system@localhost');
        $self->preferences($self->_get_preferences());
Thnks

Original issue reported on code.google.com by dardogui...@gmail.com on 26 Feb 2013 at 10:11

GoogleCodeExporter commented 8 years ago
I can add those in there, but I want to make sure I understand what the true 
problem is.  Are you getting errors are unexpected behavior because the email 
and preferences aren't in the system account?  System is special, so it should 
not be used for normal logins.

Original comment by mchol...@gmail.com on 26 Feb 2013 at 10:37

GoogleCodeExporter commented 8 years ago
i just installed and changed the password for system to be login, then tried to 
access to the stats menu and got a stacktrace of Moose cause those two 
properties where not set.

Thnks D.

Original comment by dardogui...@gmail.com on 26 Feb 2013 at 11:49

GoogleCodeExporter commented 8 years ago
Using the system user as a normal logged in user is not supported because it is 
supposed to serve as a reserved account.  You should set a password for the 
"user" user if you want to enable a password, or better, create a user by 
adding an entry to the users table.

Original comment by mchol...@gmail.com on 27 Feb 2013 at 3:37