Menu

#353 cant get a user in external database to login

open
nobody
None
1
2013-06-07
2013-06-06
Anonymous
No

as title suggests, i have created a user in a database in the folder mrbs_users folder. however when i go to login with the user it shows 'unknown user'. i also cannot login with the 3 default users. im running MRBS 1.4.9.
Help would be appreciated.

Discussion

  • Campbell Morrison

    I think there's some confusion here. There are a number of different authentication types in MRBS, set by the config variable $auth['type'].

    To use the three default users set $auth['type'] = 'config'; and add more users to the config file as required.

    If you already have users in a database somewhere then set the type to 'db_ext' and fill in the other settings as appropriate.

    However I suspect that what you want to do is just to use MRBS's standard user database. In which case set the type to 'db'. Don't enter users in the mrbs_users table manually - MRBS handles this for you. Get back to where you should be by emptying the mrbs_users table to get rid of the rows you added manually. Then in MRBS click on the 'User List' link in the top right hand corner. MRBS will then detect that you have no users and invite you to create the first user, which will be an admin user. Once created, login as that user and then create other users as required by clicking on the 'User List' link and then 'Add User'.

    Campbell

     
  • Anonymous

    Anonymous - 2013-06-06

    thanks campbell, however now that I have added the user it is saying that I don't have the necessary rights to view that page. the page being the userlist. it also still says unknown user up the top right.

     
  • Campbell Morrison

    You need to login as that user

    Campbell

     
  • Anonymous

    Anonymous - 2013-06-06

    Yeah that's what i am trying to do, but it comes up with "You do not have the necessary rights to view this page." when i use that login.

     
  • Campbell Morrison

    Although it says "You do not have ...", has it recognised you as a user by putting your username in the top right hand corner? If so, one of the reasons this can happen is if PHP sessions are not working properly. As an experiment try switching to a different session scheme by setting

    $auth["session"] = "cookie";
    

    Campbell

     
  • Anonymous

    Anonymous - 2013-06-06

    :D that managed to make it work campbell.

    so what's the difference between using a php and cookie session?

     
  • Campbell Morrison

    They're just different ways of storing the user details. You'll be fine using cookie sessions with MRBS, but there's an underlying problem with PHP sessions that may affect other applications, so it's probably a good idea to get it fixed. You should report it to your system administrator, or else if you are the system administrator then check the set up of PHP sessions in php.ini. One common problem is that the folder that is specified to hold the session data is not writable.

    Campbell

     
  • Anonymous

    Anonymous - 2013-06-06

    Ill be sure to get onto that. it would explain why my website isnt working :/ haha. But thank you so much for your help, i owe you a beer mate.

     
  • John Beranek

    John Beranek - 2013-06-07

    If you use the cookie session scheme, please set $auth["session_cookie"]["secret"] to a nice long random string in config.inc.php