Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Some of the users in the 'user-guest' container have an alias in the 'user' container. I need to retrieve the alias in the 'user' container of a 'user-guest'-user. I know the user object in one container and I want to know his aliases in a (specific) other container. Is this possible ?
The long answer involves a bit of code that allows you to obtain the information that you want. The following code is a script that will search your entire tree for alias objects that refer to an object that you specify. You will need to modify some variables so that they will contain information specific to your tree.
; Find Object Aliases script ; FindObjectAliases.wbt ; 32-bit ; ; Find all aliases in the tree that point to a specific object. ; Add in the NetWareX extender AddExtender('WWNWX34I.DLL') ; Turn off alias object dereferencing nwSetOptions(5,@FALSE) ; Set up some variables to be used later on ; The tree and target object values need to be changed for the specific ; evironment in which they are being run. TreeSpec = '\\RTFM_NDS_65X' TargetObjSpec = '.userb.test01.RTFM' SearchCtx = '[Root]' Flags = 2 Title01 = 'Find Object Aliases' ; Set up the search filter nwSearchFilter(TreeSpec,'BASECLS','',0,0,0) nwSearchFilter(TreeSpec,'ANAME','Alias',0,0,0) nwSearchFilter(TreeSpec,'AND','',0,0,0) nwSearchFilter(TreeSpec,'ANAME','Aliased Object Name',0,0,0) nwSearchFilter(TreeSpec,'EQ','',0,0,0) nwSearchFilter(TreeSpec,'AVAL',TargetObjSpec,0,0,0) nwSearchFilter(TreeSpec,'END','',0,0,0) ; Perform the search ErrorMode(@OFF) Result = nwSearchObjects(SearchCtx,'','',Flags,'') RC = LastError() ErrorMode(@CANCEL) TempObjList = StrReplace(Result,@TAB,' , ') TempMsg = StrCat('nwSearchObjects("',SearchCtx,'","","",',Flags,',"") RC = ',RC) ;Make sure the following statement is on one line TempMsg = StrCat(TempMsg,@CRLF,@CRLF,'Matching user aliases found in the search scope are',@CRLF,@CRLF,TempObjList') Message(Title01,TempMsg) nwSearchFilter('','*FREE_BUFFER*','',0,0,0) exit
Article ID: W16546
File Created: 2005:02:18:12:21:22
Last Updated: 2005:02:18:12:21:22