M5. 新規端末

新規端末登録

新規端末のアクセスを承認した後、データベースに情報を記録する前に呼び出されます。

データベース

パラメータ

戻り値

使用可能

id - 端末の仮/永久ID

address - 端末ネットワークアドレス

station - 端末名

existing - 既存端末を使用して承認

ignored

プロシージャテキスト

--[[

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

新規端末がDr.Web Serverに接続

新規端末がDr.Web Serverに接続した場合に呼び出されます。

データベース

パラメータ

戻り値

使用可能

id - 端末仮 ID

address - 端末ネットワークアドレス

station - 端末名

description - 端末の説明(Windows OS上のクライアントのみ)

ldapdn - 端末LDAP DN(Windows OS上のクライアントのみ)

sid - 端末ID

mac - 端末MACアドレス

nil - Dr.Web Serverの標準動作にデフォルト設定を使用する

boolean - Dr.Web Serverアクション:

true - 手動での承認をリクエスト(Newbie approval と同様)

false - アクセス拒否(Newbie closed と同様)

string - 承認時のプライマリグループ:

empty - 承認し、Everyone をプライマリグループに設定(Newbie open と同様)

not-empty - 承認し、この文字列に対応するIDをもつグループをプライマリに設定(注意事項:最初にIDの存在が確認され、存在しない場合は Everyone グループがプライマリに設定されます)

vector - デフォルトで承認、以下のコマンドと任意の引数を含みます:

pgroup - プライマリグループを設定、グループIDが続く必要があります

rate - レートグループを設定、レートグループIDが続く必要があります

id - 端末IDを設定、端末IDが続く必要があります

approve - 自動での承認ではなく手動での承認をリクエスト

into - 既存の端末への承認、既存の端末IDが続く必要があります

プロシージャテキスト

--[[

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

新規端末承認

新規端末が認証に成功して承認され、データベースに端末が作成された場合に呼び出されます。

データベース

パラメータ

戻り値

使用可能

id - 端末仮 ID

address - 端末ネットワークアドレス

station - 端末名

compsid - 端末ID

compmac - 端末MACアドレス

description - 端末の説明

ignored

プロシージャテキスト

--[[

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