Results 1 to 4 of 4

Thread: password webui2

  1. #1
    Junior Member
    Join Date
    Jul 2017
    Posts
    13

    password webui2

    hi,

    i have installed webui2 and i can't connect with user/password : admin/admin
    neither shinken/shinken

    can you help me
    thanks

  2. #2
    Junior Member
    Join Date
    Jul 2017
    Posts
    13
    hi,

    i have this in the brokerd.log:

    [1504342220] INFO: [broker-master] [WebUI] starting Web UI server on 0.0.0.0:7767 ...
    [1504342221] INFO: [broker-master] Connection OK to the receiver receiver-master
    [1504348992] INFO: [broker-master] [WebUI] user 'admin' is signing in ...
    [1504348992] INFO: [broker-master] [WebUI] Checking authentication for user: admin
    [1504348992] INFO: [broker-master] [WebUI] Requesting authentication for user: admin
    [1504348992] INFO: [broker-master] [WebUI] Authenticating user 'admin'
    [1504348992] INFO: [broker-master] [WebUI] Internal htpasswd authentication
    [1504348992] INFO: [broker-master] [WebUI] Internal alignak backend authentication
    [1504348992] INFO: [broker-master] [WebUI] Internal contact authentication
    [1504348992] INFO: [broker-master] [WebUI-auth-cfg-password] Authenticating user 'admin'
    [1504348992] ERROR: [broker-master] [WebUI-auth-cfg-password] You need to have a contact having the same name as your user: admin
    [1504348992] WARNING: [broker-master] [WebUI] The user 'admin' has not been authenticated.
    [1504348992] WARNING: [broker-master] [WebUI] user 'admin' access denied, redirection to: /user/login?error=Invalid user or Password
    [1504348992] WARNING: [broker-master] [WebUI] login page with error message: Invalid user or Password


    here is my /shinken/etc/contacts/admin.cfg file:

    # This is a default admin
    # CHANGE ITS PASSWORD!

    define contact{
    use generic-contact
    contact_name admin
    contactgroups admin,users
    email shinken@localhost
    pager 0600000000 ; contact phone number
    password admin
    is_admin 1
    expert 1
    }


    what's wrong?
    thanks

  3. #3
    Junior Member
    Join Date
    Jul 2017
    Posts
    13
    hello,

    i changed my admin.cfg file:

    define contact{
    use generic-contact
    contact_name admin
    contactgroups admin,users
    host_notifications_enabled 1
    service_notifications_enabled 1
    host_notification_period 24x7
    service_notification_period 24x7
    service_notification_options w,u,c,r,f
    host_notification_options d,u,r,f
    can_submit_commands 1
    service_notification_commands notify-service-by-email
     host_notification_commands notify-host-by-email
    email trazomtg@free.fr
    password admin
    is_admin 1
    expert 1


    and i have still the error:

    [1504377262] INFO: [broker-master] [WebUI-auth-cfg-password] Authenticating user 'admin'
    [1504377262] ERROR: [broker-master] [WebUI-auth-cfg-password] You need to have a contact having the same name as your user: admin
    [1504377262] WARNING: [broker-master] [WebUI] The user 'admin' has not been authenticated.
    [1504377262] WARNING: [broker-master] [WebUI] user 'admin' access denied, redirection to: /user/login?error=Invalid user or Password
    [1504377262] WARNING: [broker-master] [WebUI] login page with error message: Invalid user or Password

    }

    i don(t know what to do
    thanks

  4. #4
    Junior Member
    Join Date
    Jul 2017
    Posts
    13
    hi,

    i found that in /var/lib/shinken/modules/webui2/submodules/auth.py

    def check_cfg_password_auth(self, username, password):
    ''' Embedded authentication with password stored in contact definition.
    Function imported from auth-cfg-password module.
    '''
    logger.info("[WebUI-auth-cfg-password] Authenticating user '%s'", username)

    c = self.app.datamgr.get_contact(name=username)
    if not c:
    logger.error("[WebUI-auth-cfg-password] You need to have a contact having the same name as your user: %s", username)
    return False

    p = None
    if isinstance(c, dict):
    p = c.get('password', None)
    else:
    p = c.password

    if p == password:
    logger.info("[WebUI-auth-cfg-password] Authenticated")
    return True

    logger.warning("[WebUI-auth-cfg-password] Authentication failed, password mismatch ")
    return False


    is this the reason of my error?
    if yes, how to correct this?

    thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •