Utilities in JRButils for MICRO FOCUS v23

K to O

Killconn

Killconn clears connections from a file server under all versions of NetWare. On OES Linux, a minimum version of OES2 SP1 is required. The relevant NCP function is not implemented in earlier versions. Features include:

  • Can clear all connections from a server.
  • Can clear all not logged in connections.
  • Can clear connections for objects of a specific class or type.
  • Can clear connections for objects of a given name.
  • Can clear specific connection numbers.
  • Can clear connections which have been logged in for less than or greater than a specified time.
  • Can clear connections of users who are members of specified groups.
  • Can clear connections based on their status (bindery, licensed, unlicensed).
  • Can accept a list of object names or connection numbers in a file.
  • Can query whether or not to clear each connection.
  • Can specify a list of objects whose connections are to be retained.
  • Has a suicide option where it will logout your connection after clearing all other requested connections.

Killzero

This program will delete zero length files in a single directory or in an entire directory tree. It was written to remove the large numbers of zero length files which in the past could accumulate in student mail directories when using Pegasus Mail with directory quotas enabled. When a user had no space available and an attempt was made to deliver a message, the file was created but could not be written to, leaving a zero length file. Options include:

  • Can delete files flagged read-only.
  • Can list the zero length files without deleting them.
  • Can display only the total zero length files.
  • Can purge deleted files (this is recommended as there is no reason to recover an empty file!).
  • Can retain certain zero length files by giving a list of one or more file names, optionally containing wildcards.
  • Is smart enough not to delete Mac files with a zero length data fork but a non-zero length resource fork.
  • Can display paths in the DOS or LONG name space.
  • Killzero can process the home or mail directories for single users, all members of a group, users selected via wildcards, or a list of users in a file. It can also process directories directly.

Lastlgn

Lastlgn can be used in a login script to display the user’s previous login date and time. This provides a useful indication of when the account was last used. Note that there is a login script command (lastlogintime) which gives this information, and using this is more efficient that running an external program. However, it has the disadvantage that it is unreliable as the lastlogintime command sometimes retrieves the information from a different server to that on which authentication occurred, in which case it can display not the previous login date and time, but the one before that.

Lencheck

Lencheck reports on the length of file and directory names. It can do the following:

  • Check the length of entire paths in Micro Focus (server/vol:path), UNC or drive letter format.
  • Check the length of only file names or the lowest level component of paths.
  • Can specify the maximum length. Entries shorter than this length are not displayed.
  • Displays the length of each entry listed.
  • Can process files and/or directories including an entire directory structure. A directory structure may be checked to a nominated depth.
  • Can shorten file and directory names to comply with the desired maximum length.
  • Has flexible output options allowing columnar and csv formats for selected fields.
  • Supports both Micro Focus and Windows drives.

Licensed

Licensed is intended for use in batch files to detect the status of a connection to a file server. It sets an error level indicating whether a connection is licensed or unlicensed, and whether or not a bindery connection is logged in.

Listobj

Listobj lists objects of any or all types or classes in eDirectory. Features include:

  • Displays full names and optionally object IDs.
  • Can accept a list of names in a file, and will locate them in eDirectory.
  • Optional sorting by name, object ID, object class or full name.
  • Optional totals only.
  • Can search the full name field as well as user names.
  • Can display the results in comma delimited format.
  • Can identify duplicate object names in the tree.
  • Can display full names for users, groups and print servers as setname commands.
  • Can return an error level if no matching objects are found, providing a means to detect in a batch file if an object of any class exists.
  • Can set an error level equal to the number of matching objects.
  • Can list any class of eDirectory object in the nominated container.
  • Can search all subordinates of the nominated container.
  • Can search from [Root].
  • Can search for non-effective classes e.g. device.
  • Can list only permanent or temporary bindery objects.
  • Can give the number of objects of the specified class in each container in any branch of eDirectory, or for the entire tree. An option exists to suppress the output for containers where the count is zero.
  • Can list users based on their naming attribute (CN or uniqueID).

Lscripts

Lscripts manages login scripts. Features include:

  • Copies a file into eDirectory to become the login script.
  • Can display login scripts for all container objects regardless of their class.
  • Can display login scripts for users.
  • Can delete login scripts for users.
  • Can display or set login scripts for profile objects, organizations and organizational units.

Lsedit

Allows editing of login scripts for users, profiles, templates and container objects. It can do the following:

  • Replace one string with another throughout the script.
  • Comment out lines by prefixing “REM”.
  • Prefix, append or insert a line anywhere in the script.
  • Replace one line with multiple or insert multiple lines at a designated point in the script by using a text file.
  • Delete lines containing a matching string.
  • Delete the entire script.

Lummgr

This program may be used to lum enable users en masse, remove lum enabled status, and to display whether users are fully, partially, or not lum enabled.

Makehome

This is an NLM for NetWare and a daemon for OES Linux which monitors changes to users’ “Home Directory” attributes. It is intended for use where users are created via LDAP which can set the “Home Directory” attribute but cannot create the home directory. Upon detecting a change, makehome can create the home directory and may also:

  • Assign rights
  • Set a directory quota
  • Set a volume quota
  • Set the attributes on the directory (e.g. DiRi)
  • Create subdirectories, optionally with specified attributes, quota and trustee assignments.
  • Copy files and/or directories from a specified location into the new home directory or a subdirectory of the new home directory.

Features include:

  • A separate set of rules may be supplied for each container.
  • The rules may be applied to a single container or to a container and all of the containers below it.
  • A default set of rules may be supplied.
  • Changes detected in selected containers may be ignored.
  • Home directories set to a volume root are ignored.
  • Can specify one or more locations where home directories may be created. When the updated contents of the “Home Directory” attribute point to a location not on the allowed list, the change is ignored.
  • Home directories set to a volume root are ignored.
  • Can create a second home directory and grant rights, set attributes and a directory or volume quota.
  • Can optionally not process users created before a certain date.
  • Can optionally not make any changes to the home directory when it already exists.
  • Can be configured not to change quotas or rights when the “Home Directory” attribute is updated and the actual home directory already exists.
  • All changes made by the NLM version are displayed in the NLM’s screen.
  • All changes may be logged to a file. Substitution identifiers may be used so that the name is based on the current date, allowing new log files to be created automatically.

Makememb

Makememb is an alternative to grpadd and grpdel. While these allow adding or removing multiple users from a group, makememb allows adding or removing individual users from multiple groups. Features include:

  • Can create groups.
  • Can specify multiple groups on the command line.
  • Can specify files containing groups.
  • Can specify a file containing one user name followed by one or more group names on each line.
  • Can prompt for confirmation before making each membership change.
  • Can remove all memberships for a user.
  • Can specify a list of groups which are excluded from membership removals.
  • Can synchronize a user’s memberships with a list of groups in a file.
  • Can synchronize a user’s memberships with those of another user.
  • Can re-add all existing memberships which may be useful to reinstate any missing linkages.

Mattach

Mattach allows you to create connections to or close connections from multiple servers in a single command. Features include:

  • Can specify one or more server names, each of which may contain wildcards, and you may exclude servers by preceding the name with ‘!’ e.g. mattach rata,toki,p*,!pn*/john would log you into the designated servers as user JOHN.
  • Can establish a connection to a tree when no previous connection existed to any tree. Mattach will attempt to connect to the first server in the first parameter, or to a server name located in the Windows registry when no parameters are given. On OES Linux, it will attempt to connect to the machine on which it is running when no server name is specified.
  • Can optionally give the password on the command line.
  • Can create unauthenticated and not-logged-in connections.
  • Can list all servers on the network.
  • Can list all servers to which your workstation is connected.
  • When listing either all servers or those connected to, it can sort by server name.
  • When listing all visible servers, mattach can also display the version of each NetWare server. Version numbers for OES Linux cannot be obtained.
  • When listing all visible servers, mattach can also display the serial number of each server.
  • When listing all visible servers, mattach can also display the up time for each server.

Movehome

Movehome changes the home directory from one location to another for multiple users. Features include:

  • Creates the new home directory and copies the contents of the old home directory.
  • Can move the home directory and contents rather than copy them when the new location is on the same volume.
  • Updates the “Home Directory” attribute.
  • Can update the posixAccount “homeDirectory” attribute when the path for this is given as the third parameter on the command line.
  • Updates the “Message Server” attribute if the home directory has been moved to another server.
  • Copies a volume quota if present.
  • Can delete the old home directory and contents.
  • Can delete a volume quota from the old home directory volume.
  • Can create a file of fsupdate commands to allow removal of the old home directories at a later date.
  • Can remove the user’s rights to their old home directory.
  • Can control whether the archive bit for files in the new home directory is set, cleared, or the values from the original files are retained.
  • Can specify just a target volume in which case the path from the “Home Directory” attribute is retained for each user. This may be useful when the existing home directories are not part of a common directory structure. Each level of the new home directory is created if required.
  • Can copy home directories to Windows drives. Movehome can attempt to locate a user in Active Directory with a matching common or sam account name, and to set the homeDirectory attribute if a corresponding user is found.

Move_dir

Moves individual files, or directories and their contents from one location on a volume to another. Move_dir operates by changing the directory entry rather than copying and deleting, and so makes the change very quickly. It works for both Micro Focus and Windows drives.

Move_obj

Move_obj moves objects in eDirectory from one container to another.  Features include:

  • Objects can be moved individually, can be selected using wildcards, all members of a group may be moved, or a list of objects in a file may be moved.
  • When using an input file, the destination context may be given on each line allowing users to be moved to different contexts in a single invocation of move_obj.
  • An alias object can be created pointing to the object in its new location.
  • A delay may be introduced before creating the alias to allow replication to occur.
  • Supports moving users, distribution lists and external entities within GroupWise 2012 and earlier.
  • Can synchronize the change of DN to an associated GroupWise 2014 user or group.

Ndsrghts

Ndsrghts evaluates the rights of one or more objects to one or more target objects or to an attribute of the target objects.  The rights are shown regardless of how they are received e.g. via an ACL to the target, via inheritance from an ACL at a higher level, via security equivalence, etc. Features of ndsrghts include:

  • Can display the rights of selected objects to a target object e.g. all users to [Root].
  • Can display the rights of one or more objects to multiple target objects e.g. the rights of selected users to all container objects in the tree.
  • Can display the rights to [All Attributes Rights] or to any particular attribute of the target object (by default rights are shown to [Entry Rights]).
  • Can show how the rights are derived.
  • Can limit the output to those objects with specific rights, to those whose rights include a specific right, or those with no rights.

Netcopy

Netcopy copies individual files or an entire directory structure from one location to another. Micro Focus and Windows drives are supported. It preserves the following when copying from OES Linux or NetWare server to another:

  • All file information including the creation date and time, last update date and time, archive date and time, last access date, inherited rights filters, file attributes, extended attributes, and if possible, file ownership. Assuming the person running netcopy has sufficient rights, ownership is retained when the source and target servers are in the same tree, when copying from one tree to another and the owner is in an identical context in both trees.
  • All directory information including the creation date and time, last update date and time, last access date (if supported), inherited rights filters, directory attributes, extended attributes, and if possible, directory ownership. See the comments above on retaining ownership.
  • Optionally, all file and directory trustee assignments.
  • Optionally all directory quotas.
  • Optionally all volume quotas.

Other features include:

  • Supports DOS, LONG, NFS, Mac and extended Mac names spaces.
  • An update option allows you to copy only those files which do not exist in the destination tree, or have more recent update dates. Or, you can copy only those files which do not have an exact match of size and update date in the destination directory.
  • Can selectively copy files based on their attributes (e.g. compressed), creation date, modification date, last accessed date, archive date, owner, updater and archiver.
  • Quotas may be removed during copying and restored later. This may be useful when copying to a volume with a larger block size where each file is likely to have more space allocated.
  • Quotas may be altered as they are copied.
  • Checks that there is sufficient space available before copying a file. This can be suppressed for a slight gain in speed.
  • Can optionally ignore hidden files and directories.
  • Can prompt for confirmation before copying each file or directory.
  • Can disable the receipt of broadcasts while copying.
  • Can copy compressed files without decompression (dependent on client version).
  • Copies sparse files correctly from Micro Focus to Micro Focus drives, Micro Focus to Windows and vice versa, and Windows to Windows.
  • Works across trees.
  • Can copy files larger than 4.3 GB.
  • Can append the source path to the target path and create each level of the new target path if required.
  • Preserves Macintosh resource forks and finder information when copying between Micro Focus servers, Micro Focus to Windows NTFS drives and vice versa.
  • Allows for NFS files being created by Macintoshes and checks for resource forks to copy.
  • Can preserve ownership when copying from Windows to Windows, Micro Focus to Windows and vice versa.
  • Can attempt to copy trustees to Windows DACL entries. This is dependent on their being a Windows user with the SAM account name matching the eDirectory common name of the trustee.
  • Can copy DACL entries when the source and target paths are on Windows drives.

Nsrename

Nsrename allows the renaming of files and directories in any name space without affecting the name in other name spaces. It can also change the case of names of multiple files or directories and was in fact written to overcome a problem where a particular product failed to function correctly when it encountered NFS names in uppercase.

NTSetEnv

Takes a text string and an environment variable name as parameters, issues the text string as a prompt, reads the response and assigns it to the environment variable, on any version of Windows. This is similar to the old DOS readln utility.

Openfile

Openfile can list the files held open by selected objects, or connection numbers, or can display who has a particular file or files open. Its features include:

  • Can display open files for all logged in objects on a server, or for selected objects.
  • Can display open files for any class of object.
  • Can display open files in any name space.
  • Can display who has any files open in a particular directory, or in an entire directory tree.
  • Can process multiple servers in a single invocation. Servers may be selected via a comma separated list or wildcards, and may be excluded by preceding a name with ‘!’ e.g. “*,!venus” processes all servers on the network except venus.
  • Can display lock information for open files.
  • Can clear connections holding a file open.
  • Can set an error level corresponding to the number of open files or the number of users holding a file open.
  • Can display a connection’s open files in either the DOS or LONG name space, or the name space in which they have been opened.
  • Can produce comma delimited output with each value enclosed in double quotes.
  • Can sort the output on any of the following fields:
    Access control
    Connection number
    Directory name
    File name
    Lock type
    Name space in which opened
    Network address
    Object name
  • Data from multiple files, users, or connections can be merged before sorting and sorting into reverse order is supported.
  • Can display the total number of open files on the server.
  • When doing a merged sort by directory, it gives the number of unique files open.
  • Can display paths in Micro Focus or UNC format.

Openfile can also work in conjunction with an NLM allowing users without console operator status to display open files and to clear connections. Usage of the NLM is controlled by membership of groups or organizational roles.

Openfile cannot be used on OES1 Linux because the required NCP functions are not implemented. Displaying open files by connection became available in the first release of OES2. Displaying who has a particular file open became available in OES2 SP2.

Orgroles

Orgroles adds occupants to, removes occupants from and lists the occupants of organizational roles. Wildcards are supported allowing processing of multiple organizational roles in a single command.

This program also supports Hewlett Packard’s hpqRole which is a schema extension used to control access to remote interface boards in HP servers.

Ormemb

For use in a batch file or login script to test if a user is an occupant of an organizational role. It has similar functionality to grpmemb.