newbiegeek Posted March 8, 2011 Posted March 8, 2011 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.
Chris_Cook Posted March 8, 2011 Posted March 8, 2011 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
newbiegeek Posted March 9, 2011 Author Posted March 9, 2011 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
newbiegeek Posted March 9, 2011 Author Posted March 9, 2011 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"] = "";
ricki Posted March 10, 2011 Posted March 10, 2011 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
Chris_Cook Posted March 10, 2011 Posted March 10, 2011 @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 $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 : 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. 1
Chris_Cook Posted March 10, 2011 Posted March 10, 2011 (edited) 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 Edited March 10, 2011 by Chris_Cook 1
kingstone Posted September 25, 2013 Posted September 25, 2013 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 ?
Chris_Cook Posted September 25, 2013 Posted September 25, 2013 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now