Debian Codegraph @

doc/antora/modules/tutorials/pages/new_user.adoc

raw
1 = Adding a new user to the server
2
3 *Goal:* To configure the server with a new user, to send test packets as
4 that new user, and to receive a reply.
5
6 *Time:* 15-25 minutes.
7
8 *File:*
9
10 - `etc/raddb/users`
11
12 *`man` page:* users
13
14 The file is the usual place where new users may be added. The file is located
15 in `etc/raddb/users`. It has a manual page; `man users`, or `man 5
16 users` will display this page. The manual page describes how the entries in the file are
17 formatted and also contains some example entries.
18
19 The comments at the top of the file should also be read.
20
21 For testing purposes, add an entry at the top of the file, which will add
22 a new user "bob" with password "hello", as suggested in the `man`
23 page for the file.
24
25 Start the server:
26
27 [source, bash]
28 ------------
29 $ radiusd -X
30 ------------
31
32 Test the server with a radius test client (radclient, NTRadPing), and
33 verify that the server responds with an Access-Accept packet. For this
34 test, use a PAP password.
35
36 If the server was successful, look for a message similar to:
37
38 ---------------------------------------------------------------------
39 (0) files : users: Matched entry bob at line 1
40 (0) [files] = ok
41 ---------------------------------------------------------------------
42
43 These messages indicate which entries in the file were used to match the
44 incoming request.
45
46 If the server does not see the packet, then double-check the IP address
47 and port to which the client is sending the request.
48
49 If the server does not send an Access-Accept, then stop the server and
50 re-start it, while recording its output to a log file:
51
52 [source, bash]
53 ----------------
54 $ script log.txt
55 $ radiusd -X
56 ----------------
57
58 Send the test packet again, and after the Access-Reject is received by
59 the client, "exit" the shell to close the "log.txt" file. Open the
60 "log.txt" file in a text editor, and read the output. The cause of the
61 error can generally be determined from those messages.
62
63 The error will usually be one of the following problems:
64
65 * the shared secret was incorrect
66 * the user was not found, or no entry matched the request.
67
68 Test the server again with a PAP password, but this time, deliberately
69 use the wrong shared secret. Observe what happens and what error
70 messages are produced.
71
72 Test the server again with a test packet, this time using a CHAP
73 password. Verify that authentication also succeeds.
74
75 Test the server again with a CHAP password, but this time, deliberately
76 use the wrong shared secret. Observe what happens and what error
77 messages are produced. Also observe how the error messages are different
78 from the previous test with a PAP password and incorrect shared secret.
79
80 Stop the server.
81
82 == Questions
83
84 1. What happens when using a PAP password with an incorrect shared secret, and why do we get this result?
85 2. What is different when using a CHAP password with an incorrect shared secret?
86 3. Why does the server need access to a clear-text password to perform
87 CHAP authentication?
88
89 // Copyright (C) 2021 Network RADIUS SAS. Licenced under CC-by-NC 4.0.
90 // This documentation was developed by Network RADIUS SAS.