| 1 |
[[simultaneous-use]] |
| 2 |
= Configuring users for limited simultaneous access |
| 3 |
|
| 4 |
*Goal:* To prevent a user from having more than one login session at a |
| 5 |
time. |
| 6 |
|
| 7 |
*Time:* 20-35 minutes |
| 8 |
|
| 9 |
*Files:* |
| 10 |
|
| 11 |
- `etc/raddb/users` |
| 12 |
|
| 13 |
For this exercise, you are assumed to have previously worked |
| 14 |
through, and be familiar with, the accounting exercise from |
| 15 |
xref:accounting.adoc[Accounting], and to have an entry in the file, as given the |
| 16 |
exercise in xref:new_user.adoc[New User], for user "bob". |
| 17 |
|
| 18 |
In this exercise, youwill work through an example of a user |
| 19 |
logging into the server, and then attempting a simultaneous login for a |
| 20 |
second session, while still logged in for the first session. |
| 21 |
|
| 22 |
You should run the `bob-login-one.sh` and `bob-acct-start.sh` |
| 23 |
scripts, to simulate a successful user login. You should check the database |
| 24 |
to verify that the server knows that the user is logged |
| 25 |
in. |
| 26 |
|
| 27 |
You should then run the `bob-login-two.sh`, and observe that the |
| 28 |
second authentication request succeeds. The login record should be |
| 29 |
removed through running the `bob-acct-stop.sh` script, and check the database |
| 30 |
to verify that no one is currently |
| 31 |
logged in. |
| 32 |
|
| 33 |
you should now read the `Simultaneous-Use` file in the |
| 34 |
documentation directory, to determine how to limit a user to only one |
| 35 |
login at a time. The "bob" entry in the file should then be edited, to |
| 36 |
add the limitation that "bob" may only have one login session at a |
| 37 |
time. |
| 38 |
|
| 39 |
The scripts `bob-login-one.sh` and `bob-acct-start.sh` should be run |
| 40 |
again, to simulate a successful user login. The `bob-login-two.sh` |
| 41 |
script should then be run, to verify that the second simultaneous |
| 42 |
authentication attempt fails. |
| 43 |
|
| 44 |
After running the `bob-acct-stop.sh` script, you should run the |
| 45 |
`bob-login-two.sh` script again, to verify that the other login attempt |
| 46 |
is now permitted to succeed. |
| 47 |
|
| 48 |
== Questions |
| 49 |
|
| 50 |
1. Why is it useful to prevent a user from having more than one |
| 51 |
simultaneous login session? |
| 52 |
2. How would you configure `Simultaneous-Use` with an SQL database? |
| 53 |
3. What are the benefits of using an SQL database for |
| 54 |
`Simultaneous-Use`, over the `radumtp` file? |
| 55 |
4. How does `Simultaneous-Use` affect users with multiple "bonded" |
| 56 |
lines, like MPP, or ISDN? |
| 57 |
5. What would happen if the user tried to log in a second time, before |
| 58 |
the accounting start packet was received? |
| 59 |
|
| 60 |
// Copyright (C) 2021 Network RADIUS SAS. Licenced under CC-by-NC 4.0. |
| 61 |
// This documentation was developed by Network RADIUS SAS. |