M5. Newbies

Newbie registered

Called after granting the access to newbie but before recording information to the database.

Database

Parameters

Returned value

available

id —temporary/permanent station ID

address—station network address

station—station name

existing—approved using existing station

ignored

Procedure text:

--[[

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

Newbie connects to Dr.Web Server

Called when newbie connects to Dr.Web Server.

Database

Parameters

Returned value

availalbe

id—temporary station ID

address—station network address

station—station name

description—station description (for clients under Windows OS only)

ldapdn—station LDAP DN (for clients under Windows OS only)

sid—station SID

mac —station MAC address

niluse default settings as at standard Dr.Web Server operation

booleanDr.Web Server action:

truerequest manual approval (similarly to Newbie approval)

false—reject access (similarly to Newbie closed)

stringprimary group on acceptance:

empty—accept, set primary group to Everyone (similarly to Newbie open)

not-empty—accept and set as primary the group with ID which corresponds to this string. Attention! existence of this ID will be checked and if it does not exist, the Everyone group will be set as primary

vectoraccept by default, contains the following commands and optional arguments:

pgroup—set the primary group, must be followed by group ID

rate—set the rate group, must be followed by rate group ID

id—set the station ID, must be followed by station ID

approve—request manual approval instead of automatic accepting

into—accept into existing station, must be followed by existing station ID

Procedure text:

--[[

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

Newbie accepted

Called when access to newbie is granted, authorization is successful and station is created in database.

Database

Parameters

Returned value

available

id—temporary station ID

address—station network address

station—station name

compsid—station SID

compmac—station MAC address

description—station description

ignored

Procedure text:

--[[

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