Here is the code to delete a record from radcheck, I have again highlighted the username part we need to change in red.ĭelete from radcheck where username = ‘ myusername‘ There are a few different ways to target her record in radcheck however we’re going to use her username for this example, but you could also use the id column. Unfortunately Beyonce has decided to leave our FreeRadius server and so we need to delete her account. When we run that in the MySQL prompt we should get no errors and Beyonce is now able to log on to our FreeRadius server. So here is the code we will run add Beyonce to our FreeRadius server: INSERT INTO radcheck (id, username, attribute, op, value) VALUES (1,'beyonce','User-Password',':=','putaringonit') INSERT INTO radcheck (id, username, attribute, op, value) VALUES (1,’ myusername‘,’User-Password’,’:=’,’ mypassword‘) The insert code is like the following, I have highlighted the username part we need to replace in red and the password part we need to replace in blue. For this example the user we will be adding is Beyonce, and she will have the following login details: Username: beyonce Password: putaringonit Now we will run our insert command to add a user. Remember to terminate your MySQL queries with a semi colon! Then we need to switch to the radius database, so go ahead and enter in the following at the MySQL prompt: use radius Adding a user account to ‘radcheck’įirst connect to your database using the below, if your username is not root, then substitute root in the command for your username. It’s important to remember that like a lot of things you can choose what usernames something uses, what the database is called for something and you can even choose to use a remote MySQL server! However for this tutorial we will assume that MySQL and FreeRadius exist on the same server, and that the database is called ‘radius’ and the user account we will use with MySQL is root. This table is the table we need to interact with as it is the one that contains all the user accounts that can be authenticated with FreeRadius. When FreeRadius is used in conjunction with MySQL (most common practice I dare say) it will use a database usually called ‘radius’ and within that database there is a database table called ‘radcheck’. However if you managed to install FreeRadius previously you will probably be alright! □Ī little about FreeRadius’s MySQL Database Like I said it’s pretty easy however you might need a little background knowledge of MySQL. About 10-15 minutes of free time to do stuff. You can use whatever shell utility you like, but throughout this tutorial we will reference ‘putty’ which is available from here if you would like to download it: An active putty session already logged into your server, ready to go!.Write down a few usernames and passwords to go with to use during this tutorial and have them ready because we will need them soon. Some user accounts you want to setup in FreeRadius.Or any account that has the appropriate permissions, to keep it simple though during this tutorial we will use root, you can use whatever account you feel will do the trick though if you like. Or if you want to learn a little while you set one up then take a look at this How To here: Installing FreeRadius on CentOS 5/6 or Ubuntu 11 If you need to set this up still, take a quick look here for how to set one up in a hurry: Install FreeRadius on CentOS 5 or 6 in just 3 commands! A VPS with FreeRadius / MySQL installed.This is a very popular topic based on visitor statistics! If you need more information or wish to improve upon the content let me know in the comments section. It’s a pretty easy task and yes I am even including a script like usual to make it easy for those of you who are not ‘lazy’ just time poor □ In this tutorial I will show you how to add and remove users from the radius database.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |