NDSm::NDSContext


new

Creates a new NDSm::NDSContext object.
Example:
$C = new NDSm::NDSContext;

AbbreviateName

This method abbreviates $ObjectName. Converts a NDS name (including the naming attributes) to its shortest form relative to the name context set in $C. The abbreviated name is returned in $AbbreviatedName.
Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$AbbreviatedName = $C->AbbreviateName($ObjectName);
 

AbortPartitionOperation

Aborts a partition operation in progress.
$partitionRoot is the container name defined as root for this partition.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->AbortPartitionOperation($partitionRoot);

AddReplica

 Adds a replica of an existing NDS partition to a server. $server is the name of the server where the replica is to be stored. $partitionRoot is the name of the root object of the NDS partition to be replicated. $replicaType specifies the type of the new replica (1:secondary(r/w or 2:read-only).
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->AddReplica($server, $partitionRoot, $replicaType);

AddSecurityEquiv

Adds to the specified object's security equivalence. $equalTo Points to the name to be added to the Security Equivalence attribute of the object specified by $equalFrom . This method is handy when adding users to a group!.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->AddSecurityEquiv($equalFrom, $equalTo);

CanDSAuthenticate

If you can authenticate to the NDS this returns != 0.
Example:
$CanAuth = $C->CanDSAuthenticate();

CanonicalizeName

Converts an abbreviated name to the canonical form. The canonicalized name is returned in $Outname. For example, if the input is

   CN=Steinar Kleven
   and the name context is
   OU=Bar.O=Acme
   the canonicalized name is
   CN=Steinar kleven.OU=Bar.O=Acme

Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$Outname = $C->CanonicalizeName($InName)



 

ChangeObjectPassword

This method set the password for a given object if a public/private key pair has been assigned. See GenerateObjectKeyPair(). The $Opt flag is currently not used.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->ChangeObjectPassword($Opt, $ObjName, $oldPass, $newpass)

ChangeReplicaType

Changes the replica type of a given replica on a given server. The available $NewType values are:

0: RT_MASTER Master replica
1: RT_SECONDARY Secondary replica
2: RT_READONLY Read-only replica.

Returns 0, on success, Netware error code on failure.
Examples:
$ErrCode = $C->ChangeReplicaType($replicaName, $ServerName, $NewType);
$ErrCode = $C->ChangeReplicaType('stud.orgunit.org', 'stud_srv', 'RT_READONLY');


Debug

This method set the internal debugging of a class to a given level. Only 0 and and 1 are in use in version 1.00.

0: No debug.
1: Print function failures.

Example:
$C->Debug(1);


GenerateObjectKeyPair

This method creates or changes a public/private key pair for a specified object.
Has to be called before the object can log in.
$flag parameter is currently not used and can be ignored.
Returns 0, on success, Netware error code on failure.
Examples:
$ErrCode = $C->GenerateObjectKeyPair($ObjName, $newpass, $flag)
 

GetDefNameContext

GetDefNameContext() returns the default name context for the logged in object.
Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$NameContext = $C->GetDefNameContext();

GetPartitionRoot

Returns the partition root name of the given object ($ObjectName). The partition root name is returned in $partitionRoot.
Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$partitionRoot = $C->GetPartitionRoot($ObjectName);

IsDSAuthenticated

Returns nonzero value if you are authenticated through NDS.
Example:
$IsAuth = $C->IsDSAuthenticated();


JoinPartitions

Joins a subordinate partition to its parent partition. $RootObj is the name of the partition to be joined with its parent. $Flags are currently not used.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->JoinPartitionS($RootObj, $Flags);
$ErrCode = $C->JoinPartitionS($RootObj);

Login

Performs all authentication operations needed to establish a client's connection to the network and to the network's authentication service. As of NWSDK(14) $validperiod and $options are not used. (Use 0)
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->Login($options, $UserName, $passwd, $validperiod);

Logout

After calling Logout(), new connections cannot be established by calling Authenticate(). Logout() leaves intact all server attachments and other session connections, authenticated or unauthenticated.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->Logout();

MoveObject

Moves an NDS object from one container to another and/or renames the object. $objectName is the name of the object to move. $destParentDN is the container where the object is to be put. $destRDN is the new name of the object.
Example:
CN=Steinar.OU=Devel.O=Makers and you want to move Steinar to Sales.
For objectName pass in 'CN=Steinar.OU=Devel.O=Makers'
For destParentDN pass in 'OU=Sales.O=Makers' and
for destRDN pass in 'CN=Steinar'.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->MoveObject($objectName, $destParentDN, $destRDN);

PartitionReceiveAllUpdates

This method changes the state of the partition so all servers holding a partition replica will send entire partition information to the original partition. $partitionRoot holds the name root object name for the partition. $serverName holds the name of the server who has the partition witch should receive all updates.
This generate a lot of network traffic, so you might want to do this when network/servers are close to idle.
Returns 0 on success, Netware error code on failure.
$ErrCode = $C->PartitionReceiveAllUpdates($partitionRoot, $serverName);

PartitionSendAllUpdates

Like PartitionReceiveAllUpdates() above, but tells the partition to SEND full updates.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->PartitionSendAllUpdates($partitionRoot, $serverName);

ReloadDS

Requests a replica to synchronize with a specific server ($ServerName).
It also request server to reload DS.NLM.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->ReloadDS($ServerName);

RemoveAllTypes

Returns the object name as a typeless in $typeLess.
Example: ``CN=Steinar.OU=Devel.O=Makers'' in $Name will return ``Steinar.Devel.Makers'' in $typeLess.
Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$typeLess = $C->RemoveAllTypes($Name);

RemoveAttrDef

Deletes an attribute definition ($AttrName) from the NDS Schema. Clients cannot subtract from the standard set of attribute definitions defined by the NDS Base Schema. (these attributes are flagged nonremovable). Clients can, however, add and remove non-standard definitions. (if not in use).
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemoveAttrDef($AttrName);

RemoveClassDef

Removes a class definition from the NDS Schema. The same rules as for RemoveAttrDef() apply when deleteing class definitions.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemoveClassDef($ClassName);

RemoveObject

Removes the named object from NDS. The object can not have any subordinates.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemoveObject($ObjectName);

RemovePartition

Removes the named partition from NDS by deleting its master replica. The partition must be completely empty (except for the root object) or the deletion will fail. In addition, no other replicas can exist. Remove non-master replicas with RemoveReplica().
Returns 0 on success, Netware error code on failure.
Examples:
$ErrCode = $C->RemovePartition($partitionRoot);
$ErrCode = $C->RemovePartition('stud.grad93.orgunit');


 

RemoveReplica

This method removes a replica from the replica set of an NDS partition. You can't remove the master replica with this method. If that's what you want you should use RemovePartition() instead.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemoveReplica($ServerName, $partitionRoot);

RemSecurityEquiv

Removes a security equivalence from the specified object. $equalFrom is the name of the object whose Security Equivalence attribute is to be modified. $equalTo is the object name to be removed from the list.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->RemSecurityEquiv($equalFrom, $equalTo);

RepairTimeStamps

Sets the time stamps for all of a partition's objects and object attributes to the current time on the NetWare server where the master replica is located. $partitionRoot is the name of the partition's root object.
Returns 0 on success, Netware error code on failure.
$ErrCode = $C->RepairTimeStamps($partitionRoot);

ReplaceAttrNameAbbrev

Replaces the abbreviated attribute name with its unabbreviated name.
Example: If $inName is ``CN'', the value of $longName will be ``Common Name''.
Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$longName = $C->ReplaceAttrNameAbbrev($inName);

SetDefNameContext

Sets the default name context to $NameContext.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->SetDefNameContext($NameContext);


SplitPartition

Divides a partition into two partitions at a specified $Container. $Flags are not used.
Returns 0 on success, Netware error code on failure.
Example:
$ErrCode = $C->SplitPartition($Container, $Flags);

VerifyObjectPassword

Verifies the password of $objectName. $Passwd can be any length and all characters are significant. Upper- and lowercase letters are distinct. $opt is reserved; pass in zero.
Returns 0 on success (password match), Netware error code on failure.
Example:
$ErrCode = $C->VerifyObjectPassword($opt, $objectName, $Passwd);

WhoAmI

This method is Novells answer to unix 'whoami'.
Your loginname will be returned in $MyName.
Returns undef on failure in which case you should use LastErr() to get the Netware error code.
Example:
$MyName = $C->WhoAmI();

SEE ALSO

the NWServer class

the Misc help file

the Buf_T class

the NDSm help file

the Audit class

http://www.ahs.hist.no/distr/NDSm/


COPYRIGHT

  Copyright (c) Steinar Kleven 1997.
  All rights reserved.