summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2015-08-03 04:10:21 +0000
committeryasuoka <yasuoka@openbsd.org>2015-08-03 04:10:21 +0000
commit530b26897d916b59a0f6cc9a1a3f533f4f7c3185 (patch)
tree718e5835a2490973b02b402bd143b6e6d8ec791c
parentMake radiusd.conf.5 describe all configuration options (diff)
downloadwireguard-openbsd-530b26897d916b59a0f6cc9a1a3f533f4f7c3185.tar.xz
wireguard-openbsd-530b26897d916b59a0f6cc9a1a3f533f4f7c3185.zip
Add radiusctl.8
ok deraadt
-rw-r--r--usr.sbin/radiusctl/Makefile5
-rw-r--r--usr.sbin/radiusctl/radiusctl.887
2 files changed, 89 insertions, 3 deletions
diff --git a/usr.sbin/radiusctl/Makefile b/usr.sbin/radiusctl/Makefile
index 0cc602465af..73704e55083 100644
--- a/usr.sbin/radiusctl/Makefile
+++ b/usr.sbin/radiusctl/Makefile
@@ -1,8 +1,7 @@
-# $OpenBSD: Makefile,v 1.1 2015/07/21 04:06:04 yasuoka Exp $
+# $OpenBSD: Makefile,v 1.2 2015/08/03 04:10:21 yasuoka Exp $
PROG= radiusctl
SRCS= radiusctl.c parser.c chap_ms.c
-#MAN= radiusctl.8
-NOMAN= #
+MAN= radiusctl.8
CFLAGS+= -Wall -Wextra -Wno-unused-parameter
LDADD+= -lradius -lcrypto
DPADD+= ${LIBRADIUS} ${LIBCRYPTO}
diff --git a/usr.sbin/radiusctl/radiusctl.8 b/usr.sbin/radiusctl/radiusctl.8
new file mode 100644
index 00000000000..40a231eeb32
--- /dev/null
+++ b/usr.sbin/radiusctl/radiusctl.8
@@ -0,0 +1,87 @@
+.\" $OpenBSD: radiusctl.8,v 1.1 2015/08/03 04:10:21 yasuoka Exp $
+.\"
+.\" Copyright (c) YASUOKA Masahiko <yasuoka@yasuoka.net>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" The following requests are required for all man pages.
+.\"
+.\" Remove `\&' from the line below.
+.Dd $Mdocdate: August 3 2015 $
+.Dt RADIUSCTL 8
+.Os
+.Sh NAME
+.Nm radiusctl
+.Nd control the RADIUS protocol daemon
+.Sh SYNOPSIS
+.Nm
+.Op Fl h
+.Ar command
+.Op Ar argument ...
+.Sh DESCRIPTION
+The
+.Nm
+utility controls the
+.Xr radiusd 8
+daemon.
+.Pp
+The following commands are available:
+.Bl -tag -width Ds
+.It Xo
+.Cm test
+.Ar hostname
+.Ar radius_secret
+.Ar user_name
+.Op options
+.Xc
+Sends a RADIUS authentication request packet and shows the result.
+The request is
+for the user specified by the
+.Ar user_name
+and sent to the RADIUS server specified by the
+.Ar hostname .
+The
+.Ar radius_secret
+is the shared secret with the server.
+The options are as follows:
+.Bl -tag -width Ds
+.It Cm password Ar password
+Use the
+.Ar password
+for the
+.Ar user_name .
+.It Cm port Ar port
+Use the
+.Ar port
+when send a packet to the
+.Ar hostname .
+If the port is omitted,
+the default port number 1812 is used.
+.It Cm method Ar method
+Use the
+.Ar method
+for the authenticaiton. It can be either
+.Cm pap ,
+.Cm chap
+or
+.Cm mschapv2 .
+If this option is omitted,
+.Cm pap
+is used.
+.It Cm nas-port Ar nas-port
+Specify an integer value for the NAS-Port attribute in the packet.
+If this option is omitted, 0 is used.
+.El
+.El
+.Sh SEE ALSO
+.Xr radiusd 8