Novell is now a part of Micro Focus

Linux Add Trustee

Novell Cool Solutions: Cool Tool

Digg This - Slashdot This

In Brief

Perl Script for adding a trustee with scan rights to an NSS file.


Product Categories:
  • Linux
  • Open Enterprise Server
  • Posted:28 Nov 2006
    File Size:3KB
    Publisher:Dean Giles


    Please read the note from our friends in legal before using this file.


    This tool adds a trustee to an NSS file. The trustee is given file scan rights by default. It uses the Virtual File Services (Originally called Virtual File Services for NetWare) which were ported over to Linux. The SDK for this API set can be downloaded from The objective of the tool is to add a trustee to a file using XML as specified in the VFS for NetWare specification. It is intended to be used as a sample script for developers that may want to use the VFS API set to view and manage storage.

    How to Use the file: is a Perl script. So Perl must be installed and running on the Linux server that this file is being loaded on. NSS must be installed to get the VFS support.

    From a terminal prompt type: perl user.context.tree /path/fileName.ext <enter>

    Where user is the trustee to add. The name needs to include the full context including the tree. Where fileName is the name of the file, it must include the complete path including the leading slash.

    Example: perl user1.novell.COMPANY_TREE /home/usr/user1/file.txt <enter>

    A sample output would be the following:

    grep57:/a # perl user1.sms.GREPTREE /media/nss/NSS1/file.txt
    file is now open
    NSS management file Name: +</_admin/Manage_NSS/files.cmd
    Trustee: user1.sms.GREPTREE
    FileName: /media/nss/NSS1/file.txt
    Request Sent: <virtualIO><datastream name="command"/></virtualIO><fileRequest><trustees><addTrustee><name>user1.sms.GREPTREE</name><rights>fileScan</rights><fileName>/media/nss/NSS1/file.txt</fileName></addTrustee></trustees></fileRequest>
    <result value="0"><description>success</description></result>
    <result value="0"><description>zOK</description></result>

    The specifications explain the XML tags.

    Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

    © Copyright Micro Focus or one of its affiliates