|
|
| Browse NETS topics: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z | |
(as root)
apt-get install freeradius
This created a user named "freerad" and group "freerad", and
installed, among other things,
/etc/freeradius - config files/etc/init.d/freeradius -
boot-time startup script/usr/bin/rad*/usr/lib/freeradius//usr/sbin/freeradius - the
main daemon, aka radiusd/var/log/freeradius - where it
logs/usr/share/doc/freeradius/usr/share/freeradius//usr/share/snmp/mibs/RADIUS-*To maximize flexibility the Radius server configuration has the following flow.
od -N 64 /dev/randmo | md5sum
This produces a 32 character hex string. FreeRadius only allows
31 characters in the secret, so simply take the first 31
characters and drop the last one.
When adding a new user to the file, the command /usr/local/bin/cryptpasswd can be used to generate a new MD5 style password hash. The format is identical to /etc/shadow so they could be copied from there as well.
(as root)
freeradius -xxyz -l stdout
I used radclient to test that the daemon responded to login
attempts for siemsen, as shown below, with the proper password
and the proper shared secret (see the usual place).
frgp-ws-1# echo "User-Name = siemsen, User-Password = password" | \
radclient -x localhost auth shared-secret
Sending Access-Request of id 179 to 127.0.0.1:1812
User-Name = "siemsen"
User-Password = "xxx"
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=179, length=20
frgp-ws-1#
To make the changes "take" after you edit
the radius config files, do
<as root>
/etc/init.d/freeradius restart
To make the Movaz to use RADIUS authentication, use the commands documented in the NETS Movaz accounts and RADIUS authentication page.
Configuring a Movaz to do RADIUS authentication is documented in the Movaz RAYexpress User's Guide in the section titled Configuring RADIUS To Authenticate Users at Login. That section describes some attributes that must be present in the reply packets that are generated by the RADIUS server. If the reply packets don't contain the right attributes, the Movaz will reject the response packet, and RADIUS authentication won't work.
When a Movaz client sends a valid Access-Request (containing a valid username/password) to a freeradius server, the server will respond with an Access-Accept packet. The Access-Accept packet must contain attributes named Service-Type, Movaz-Initial-CLI-Access-Level and Movaz-Max-CLI-Access-Level. If they don't, the Movaz will show the problem when you use a "show log security" command. With freeradius configured the default way, I got
1991/03/09 04:09:20.966 ( TELNETD) CLI user 'siemsen' failed to log in via radius from 128.117.10.2
1991/03/09 04:09:20.799 ( TELNETD) radAuthenticate: returning Access-Reject [ReplyMsg="hello from NCAR NETS"]
1991/03/09 04:09:20.633 ( TELNETD) radServerTransaction: returning Access-Reject
1991/03/09 04:09:20.466 ( TELNETD) radRspParse: invalid service type 1, forcing Reject
1991/03/09 04:09:20.283 ( TELNETD) radServerTransaction: [Server 192.43.217.2:1812, user siemsen] sending (attempt 1)
RADIUS service types are defined in RFC 2865, which defines
RADIUS. Email to Movaz support got me this:
Subject: RE: can't get RADIUS workingThe Movaz-Initial-CLI-Access-Level and Movaz-Max-CLI-Access-Level attributes are not documented by Movaz.
From: Dennis King
Date: Fri, 5 Aug 2005 15:00:37 -0400 (13:00 MDT)
Pete,
We only support the service-types as defined below:
Service-Type Freeradius keyword Corresponding Movaz Attribute Value 7 (NAS Prompt) NAS-Prompt-User Read-Only 6 (administrative) Administrative-User AdministratorOr alternatively movaz specific permissions:
Movaz-Initial-CLI-Access-Level = {readonly | readwrite |administrator |superadministrator}
Dennis A. King
Later, I wanted to know how to store the user account data on
the Radius server. So...
My RayExpress boxes authenticate passwords using a RADIUS
server. This is nice, but all it really buys us that when a
user wants to change their password, they can do it in one
place instead of having to log into each Movaz box.
When I installed the RADIUS server, I hoped that it would
allow me to maintain account information on the server. For
instance, when we hire a new engineer, I wanted to just create
a new account for him on the RADIUS server, and have him be
able to log into all our Movaz boxes.
Is there a way to make the RayExpress authenticate the
username and password with the RADIUS server, so I can
maintain accounts on the RADIUS server?
-- Pete
Subject: RE: RADIUS accounts
Pete,
The RADIUS server does maintain a users file. The RADIUS
servers are configured with usernames, passwords, and
authorization levels and act in place of the user database
local to an NE. Each user who logs into the NE via RADIUS
authentication must be represented in the server's users file.
The RADIUS-to-local fallback will only work when connectivity
to the RADIUS server is down.
Dennis A. King
From: Pete Siemsen
Date: Fri, 24 Mar 2006 09:55:12 -0700
Sent: Monday, December 05, 2005 1:29 PM
To: Support@movaz.com
Subject: RADIUS accounts
Date: Mon, 5 Dec 2005 14:15:14 -0500
From: Dennis King
To: Pete Siemsen
From: David Mitchell
To: Pete Siemsen
Subject: Re: Fwd: RADIUS accounts
Pete,
so I added a rule to the movaz ACL on mlra so that the Movaz shelves can speak Radius to the frgp-ws-1. I had already set den-movaz-1 to check Radius before local for authentication. And imagine my surprise when everything worked. I don't have an account in the local user database on den-movaz-1 yet I can log into it. You were closer than you thought. We really just need to spiff up the radius configuration so that people get read-only or read-write as appropriate.
-David
Normally access to a Cisco device has two steps. The user first connects and authenticates with a password. If sucessful this gives them unprivledged access. They can then issue the command 'enable' and be prompted again for a password. If the correct password is given, the user is then in privledged "enable" mode.
This process can use Radius. The initial login request is passed to Radius and the username and password are checked in the usual manner. If the user then requests to enable, the Cisco will try to authenticate the user '$enab15$' via Radius. If this check succeeds, the user is given enable access. Unfortunately the username of the user requesting enable access is not passed to the Radius server in this second check. As a result, the Radius server cannot use that information as part of it's decision of whether or not to grant access.
When using Radius, it is also possible for the Radius server to specify that a user should be given enable access immediately upon logging in. This is done by specifying the exact same Service-Type attributes used on the Movaz clients. If enable access is provided via this method, there is no need to allow any later '$enab15$' requests to succeed. By doing things this way, it is possible to provide true read-only accounts which cannot escalate their privledge since there would be no valid enable password.
When a request is successful, you'll see
Sending Access-Accept of id 14 to 10.10.3.70:3203
The Movaz user will see
Cannot connect to remote authentication server. Login using local account.
When the daemon receives an access-request packet with a shared secret that doesn't match, you'll see junk in the log message that shows the "User-Password". When the shared secret matches, the User-Password will show the actual password that the user typed.
When the daemon receives an access-request packet with a password that doesn't match one in the system passwd file, the logs will contain
rlm_unix: [siemsen]: invalid password
modcall[authenticate]: module "unix" returns reject for request 5
This happens when the RADIUS server's response contains the wrong Service-Type.
Cisco IOS, under 12.0(28d) at least, behaves oddly if the Radius server is unavailable. If the backup password method is 'enable', then the terminal server issues a new 'password:' prompt to the user if the Radius server does not respond. If the backup method is 'line', it compares the password already provided by the user to the line password. Unless the users Radius password is the same as the line password, this check fails and it cycles back to the beginning and provides a Username prompt.