Dell PowerConnect W Clearpass 100 Software Auto Create MAC Auth Account (Authe - Page 25

If you prefer to allow the credentials

Page 25 highlights

&& (NwaRadiusLocalServer()->GetUserCount(array( // sponsor_name is set to the username on create. 'sponsor_name' => strtolower(GetAttr('User-Name')), // delete_time is 0 for valid accounts. 'delete_time' => 0, // Only search for devices. 'mac_auth' => 1) // Check that the returned count is greater than the allowed. ) >= $MAX_MAC_ACCOUNTS) // If it is, then the AccessReject()* will stop the rest of the expression. // If it is not, then the 1 will allow the expression to continue. ? (AccessReject() && 0) : 1 ) // The start of the original expression... && empty($user['mac_auth']) && ... * Note, the above example denies logins passed the limit. If you prefer to allow the credentials based login to continue, and simply limit the MAC accounts created, swap ? (AccessReject() && 0) : 1 for ? 0 : 1 Amigopod |Technical Note Auto Create MAC Account|25

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25

Amigopod
|Technical Note
Auto Create MAC Account
|
25
&&
(
NwaRadiusLocalServer
()
->
GetUserCount
(
array
(
// sponsor_name is set to the username on create.
'sponsor_name'
=>
strtolower
(
GetAttr
(
'User-Name'
))
,
// delete_time is 0 for valid accounts.
'delete_time'
=>
0
,
// Only search for devices.
'mac_auth'
=>
1
)
// Check that the returned count is greater than the allowed.
)
>=
$MAX_MAC_ACCOUNTS
)
// If it is, then the AccessReject()* will stop the rest of the expression.
// If it is not, then the 1 will allow the expression to continue.
?
(
AccessReject
()
&&
0
)
:
1
)
// The start of the original expression…
&&
empty
(
$user
[
'mac_auth'
])
&&
…
* Note, the above example denies logins passed the limit.
If you prefer to allow the credentials
based login to continue, and simply limit the MAC accounts created, swap
?
(
AccessReject
()
&&
0
)
:
1
for
?
0
:
1