N5. Nuevos usuarios

El nuevo usuario se ha registrado

Después de dar acceso a un nuevo usuario, pero antes de grabar la información correspondiente en la base de datos

Base de datos

Parámetros

Valor devuelto

disponible

id — ID temporal/permanente de la estación,

address — dirección de red del cliente,

station — nombre de la estación,

existing — aceptar para la estación existente

se ignora

Texto del hook:

--[[

Database:

 available

 

Called:

 when newbie access granted but before information stored in database

 

Parameters:

 id             station temporary/permanent ID

 address        station network address

 station        station name

 existing       approved using existing station

 

Returned value:

 ignored

 

]]

 

local args = ... -- args.id, args.address, args.station

El nuevo usuario se está conectando al Servidor Dr.Web

Se llama cuando un nuevo usuario se conecta al Servidor Dr.Web

Base de datos

Parámetros

Valor devuelto

disponible

id — ID temporal de la estación,

address — dirección de red del cliente,

station — nombre de la estación,

description — descripción de la estación (solo para clientes con sistema operativo Windows),

ldapdn — LDAP DN de la estación (solo para clientes con sistema operativo Windows),

sid — SID de la estación,

mac — dirección MAC de la estación

nil — utilizar valores por defecto como en el funcionamiento estándar del Servidor Dr.Web,

boolean — acción del Servidor Dr.Web:

true — solicitar confirmación manual (similar a Newbie approval),

false — denegar acceso (similar a Newbie closed)

string — grupo primario al aceptar:

empty — aceptar, establecer grupo Everyone como grupo primario (similar a Newbie open),

not-empty — aceptar acceso y establecer como primario el grupo cuya ID corresponde a este renglón. ¡Atención! la existencia de esta ID será verificada; si no existe, se establecerá como primario el grupo Everyone,

vector — confirmar por defecto; contiene los siguientes comandos y argumentos necesarios:

pgroup — especificar grupo primario; luego debe figurar la ID de dicho grupo,

rate — especificar grupo tarifario; luego debe figurar la ID de dicho grupo,

id — especificar ID de la estación; luego debe figurar la ID de dicha estación

approve — solicitar confirmación manual en lugar de confirmación automática,

into — confirmar en la correspondiente estación; luego debe seguir la ID de dicha estación

Texto del hook:

--[[

Called:

 when newbie connected

 

Database:

 available

 

Parameters:

 id             station temporary ID

 address        station network address

 station        station name

 description    station description (Windows client only)

 ldapdn         station LDAP DN (Windows client only)

 sid            station computer SID

 mac            station computer MAC

 

Returned value:

            nil        default, standard server operation according settings

 boolean    true       request approval (like 'Newbie approval' does)

            false      reject access (like 'Newbie closed' does)

 string     empty      accept, set primary group to 'Everyone'

                         (like 'Newbie open' does)

            not-empty  accept, set primary group to this string (ID) (substring after space treated as rate group id)

                       Attention! Existence of This ID will be checked and

                       if it does not exist it will be replaced by `Everyone'

 vector                accept by default, must contain commands and optional arguments:

                       "pgroup"  - set primary group, must be followed by group id

                       "rate"    - set rate group, must be followed by rate group id

                       "id"      - set station id, must be followed by station id

                       "approve" - request approval instead of accepting

                       "into"    - accept into existing station, must be followed by existing station id

 

 

Procedure from next set will be called if returned nothing.

]]

 

local args = ... -- args.id, args.address, args.station

 

-- place my station (named ADMINISTRATOR) into `Everyone' group ignoring newbie policy and newbie's preference

if string.upper( args.station ) == 'ADMINISTRATOR' then

 return ''

end

 

-- set new UUID for any station with this id and request for manual approve, useful for cloned stations

if args.id == '01234567-89ab-cdef-0123-456789abcdef' then

 return { "id", dwcore.get_uuid(), "approve" }

end

 

-- no return => `nil' value => according server settings

Nuevo usuario aceptado

Se llama cuando se da acceso a un nuevo usuario, su autenticación es exitosa y la estación es creada en la base de datos.

Base de datos

Parámetros

Valor devuelto

disponible

id — ID temporal de la estación,

address — dirección de red del cliente,

station — nombre de la estación,

compsid — SID de la estación,

compmac — dirección MAC de la estación,

description — descripción de la estación

se ignora

Texto del hook:

--[[

Called:

 when newbie access granted, authorization is successfull

 and station created in database

 

Database:

 available

 

Parameters:

 id             station temporary ID

 address        station network address

 station        station name

 compsid        station UID (SID on Windows)

 compmac        station MAC address

 description    station description

 

Returned value:

 ignored

 

]]

 

local args = ... -- args.id, args.address, args.station, args.compsid, args.compmac, args.description