rlm_always(5)

πŸ“¦
version 3.2.10 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, welcome to rlm_always(5) β€” the manual page for rlm_always, a FreeRADIUS Module that is literally built to β€œalways” return a value during the processing of a configuration section. No cap, it’s giving tiny-but-powerful. πŸ’…

✨ DESCRIPTION ✨

The rlm_always module provides a simple way to "always" return a value during the processing of a configuration section. slay.

The main configuration item is rcode, which sets the return code that this instantiation of the module will return. The default, if none specified, is fail. Periodt.

The valid options for rcode are, like, exactly these:

  • reject β€” reject the user;
  • fail β€” a failure has occurred;
  • ok β€” success;
  • handled β€” the request has been handled: processing should be stopped and the response sent;
  • invalid β€” request is invalid;
  • userlock β€” the user account has been locked out;
  • notfound β€” the user account cannot be found;
  • noop β€” no-op: nothing has happened;
  • updated β€” the request has been updated.

πŸ› οΈ CONFIGURATION πŸ› οΈ

  • rcode = <code> β€” this module will always return with the code specified, as listed in the rcode lineup above. If unspecified, the default is fail.
  • simulcount = <n> β€” if this module is used in the session{} section, the simulcount option simulates the user having n current sessions. The default is to not override the number of sessions.
  • mpp = <yes|no> β€” if set to yes, and this module is used in the session{} section, this simulates the user having multilink sessions. The default is no.

πŸŽ€ EXAMPLE πŸŽ€

okay, code time β€” and yes, it is exactly this:

modules {
  ...
  # instantiate the "always" module with the name "ok"
  always ok {
     # return code for this instantiation is "ok":
     rcode = ok
  }
  ...
}

authorize {
  ...
  redundant {
     sql1          # try to find the user in sql1
     sql2          # try to find the user in sql2
     # the default here would be to fail, but...
     ok            # if still not found, it's OK.
  }
  ...
}

the comments in the example are doing the explaining β€” bestie behavior, honestly. 🫢

🌈 SECTIONS 🌈

This module can appear in these sections:

authorization, authentication, postauthentication, preaccounting, accounting, preproxy, postproxy

πŸ¦‹ FILES πŸ¦‹

  • /etc/raddb/mods-available/always

πŸ‘‘ SEE ALSO πŸ‘‘

Further details of how module return codes operate can be found at <http://wiki.freeradius.org/config/Fail-over>.

πŸ’œ AUTHOR πŸ’œ

Chris Parker <cparker@segv.org>, Matthew Newton <matthew@newtoncomputing.co.uk>.

byeee πŸ’– β€” rlm_always(5) Β· FreeRADIUS Module Β· 10 January 2015.

πŸ“¦ where this page comes from