+ Post New Thread
Results 1 to 9 of 9
Web Development Thread, MRBS - Creating non-admin user in Coding and Web Development; Hi I'm a bit stuck with MRBS. I have it installed locally on my machine using the latest version of ...
  1. #1

    Join Date
    Mar 2011
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    MRBS - Creating non-admin user

    Hi

    I'm a bit stuck with MRBS. I have it installed locally on my machine using the latest version of XAMPP. Basically I am able to login and book using the default created administration details and the sample admin users alice and bob.

    However i am stuck on how to create a general user that just has the ability to book and edit their own bookings.

    The authentication method I am using is just through config.inc.php - i'm sure there is a part of that script that i need to edit to add users but I can't figure out where.

    Any help would be much appreciated.

  2. #2

    Join Date
    Sep 2008
    Location
    England
    Posts
    278
    Thank Post
    6
    Thanked 70 Times in 62 Posts
    Rep Power
    53
    You need to add the following line to the end of config.inc.php

    $auth["user"]["chris"] = "password";

    That should add a user called chris with a password of password.

    You might need to check if you have unset($auth["user"]); in your config.inc.php as that will disable any users set before that line. You will want to add it before you go live to disable alice and bob which should be in systemdefaults.inc.php

  3. #3

    Join Date
    Mar 2011
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi

    I added the line $auth["user"]["test"] = "password"; and I am able to login with test and password however it is giving the same permissions as admin. How do i go about adding a regular user that is just able to book?

    Do i need to change anything in systemdefaults?

    Thanks

  4. #4

    Join Date
    Mar 2011
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Stuck...

    Below is the current settings I have in the systemdefaults.inc.php

    Ideally I just want one administrator and one regular user.

    What way do i go about that?

    // The list of administrators (can modify other peoples settings).
    //
    // This list is not needed when using the 'db' authentication scheme EXCEPT
    // when upgrading from a pre-MRBS 1.4.2 system that used db authentication.
    // Pre-1.4.2 the 'db' authentication scheme did need this list. When running
    // edit_users.php for the first time in a 1.4.2 system or later, with an existing
    // users list in the database, the system will automatically add a field to
    // the table for access rights and give admin rights to those users in the database
    // for whom admin rights are defined here. After that this list is ignored.
    unset($auth["admin"]); // Include this when copying to config.inc.php
    $auth["admin"][] = "127.0.0.1"; // localhost IP address. Useful with IP sessions.
    $auth["admin"][] = "administrator"; // A user name from the user list. Useful
    // with most other session schemes.
    //$auth["admin"][] = "10.0.0.1";
    //$auth["admin"][] = "10.0.0.2";
    //$auth["admin"][] = "10.0.0.3";

    // 'auth_config' user database
    // Format: $auth["user"]["name"] = "password";
    $auth["user"]["administrator"] = "secret";
    $auth["user"]["alice"] = "a";
    $auth["user"]["bob"] = "b";

    // 'session_http' configuration settings
    $auth["realm"] = "mrbs";

    // 'session_remote_user' configuration settings
    //$auth['remote_user']['login_link'] = '/login/link.html';
    //$auth['remote_user']['logout_link'] = '/logout/link.html';

    // 'auth_ext' configuration settings
    $auth["prog"] = "";
    $auth["params"] = "";

  5. #5
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,477
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    53
    HI

    Is there an easy way to get mrbs to authenticate with a windows 2008 r2 domain. Mine is running on a ubuntu box.

    Thanks

    Richard

  6. #6

    Join Date
    Sep 2008
    Location
    England
    Posts
    278
    Thank Post
    6
    Thanked 70 Times in 62 Posts
    Rep Power
    53
    @newbiegeek: Please can you describe your deployment some more, specifically, which mrbs version are you running and what are you hosting it on. Are you accessing it from the same pc its being hosted on? It might be that its picking up admin rights from the line
    Code:
    $auth["admin"][] = "127.0.0.1";
    This gives admin to anyone logging in from the same pc that you are hosting mrbs on.

    Copy and paste this to your config.inc.php file before any users you have allready put in :
    Code:
    unset($auth["admin"]);
    $auth["admin"][] = "administrator"; // A user name from the user list.
    You shouldnt generally be making changes to systemdefaults.inc.php, your configuration should go in config.inc.php. This is so you dont lose your settings when you come to upgrade.

  7. Thanks to Chris_Cook from:

    kingstone (25th September 2013)

  8. #7

    Join Date
    Sep 2008
    Location
    England
    Posts
    278
    Thank Post
    6
    Thanked 70 Times in 62 Posts
    Rep Power
    53
    Quote Originally Posted by ricki View Post
    HI

    Is there an easy way to get mrbs to authenticate with a windows 2008 r2 domain. Mine is running on a ubuntu box.

    Thanks

    Richard
    Please can you start a new thread for this as its not quite the same issue that the original poster has. This helps to avoid confusion when people are searching for answers. Thanks.

    Essentially you have two options: 1. Use the built-in ldap authentication method. 2. Host mrbs on a windows/iis server and use Integrated Windows Authentication. Option 2 is my preferred one on a largely windows network as it gives you single sign on (sso) for your windows xp/7 users (they wont have to re-enter their password). Please see this link for the mrbs documentation, as it describes all of this quite well: MRBS: Documentation : AUTHENTICATION
    Last edited by Chris_Cook; 10th March 2011 at 10:17 PM.

  9. Thanks to Chris_Cook from:

    kingstone (25th September 2013)

  10. #8

    Join Date
    Sep 2013
    Posts
    2
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by Chris_Cook View Post
    You need to add the following line to the end of config.inc.php

    $auth["user"]["chris"] = "password";

    That should add a user called chris with a password of password.

    You might need to check if you have unset($auth["user"]); in your config.inc.php as that will disable any users set before that line. You will want to add it before you go live to disable alice and bob which should be in systemdefaults.inc.php
    $auth["user"]["chris"] = "password"; -> this code OK.
    So maybe help me, how to create user level admin ?

  11. #9

    Join Date
    Sep 2008
    Location
    England
    Posts
    278
    Thank Post
    6
    Thanked 70 Times in 62 Posts
    Rep Power
    53
    So MRBS can use login information from many sources. The $auth code from your post creates a user inside mrbs called chris, with a password of 'password'.

    MRBS uses a separate array to allow admin access based on different conditions, which could be ip address, or username. The lines that control this begin with $auth["admin"][]. To make the chris user above an admin, add the line:

    $auth["admin"][] = "chris"

    You need to also review the other $auth["admin"][] lines in your MRBS config file to make sure they do what you want.

    If you have a user logging in from Active Directory or other auth system, you can use the username from that system in an $auth["admin"][] line and it should match it. IE, and Active Directory username called 'dave' could be added with this line:

    $auth["admin"][] = "dave"

    That assumes you have the authentication setup correctly for Active Directory.

    You also need to make sure that your usernames and admin config is after the unset($auth["admin"]); and $unset($auth["user"]); lines, or else your settings won't apply.

    Hope this helps.



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 22nd November 2010, 11:23 AM
  2. MRBS user name help
    By h229229 in forum How do you do....it?
    Replies: 0
    Last Post: 16th March 2010, 06:09 AM
  3. MRBS and Non Admin Users
    By Outlaw27 in forum Network and Classroom Management
    Replies: 1
    Last Post: 13th October 2009, 09:27 AM
  4. creating new MRBS groups
    By simmthd3 in forum Network and Classroom Management
    Replies: 0
    Last Post: 10th April 2009, 06:24 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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