--[[
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
|