zac for Linux (1)

Name

zac - The command line management interface for the Micro Focus ZENworks Agent that is installed and running on Linux managed devices.

Syntax

zac command options

Description

The zac utility performs command line management functions on the ZENworks managed device, including installing and removing software bundles, applying policies, and registering and unregistering the device.

Guide to Usage

This section contains a guide to general command formatting and conventions.

Most commands have a long form and a short form:

  • Long form: add-reg-key
  • Short form: ark

When both forms are available, the command is listed as follows:

add-reg-key (ark) options

When using the command, enter only the long form or the short form:

zac add-reg-key options

zac ark options

If an option includes a space, enclose it in quotation marks:

zac ark "option 1"

Mandatory and Optional arguments

Arguments enclosed inside parentheses ( ) are mandatory and those enclosed by square brackets [ ] are optional.

Ellipsis (...)

An ellipsis indicates that a command accepts multiple entries of the last argument type. The arguments must be separated by space or commas, depending on the command. For example:

zac <command> [options] (server) (bundle) [...]

The ellipsis indicates that <command> can accept multiple bundles. In the command level help, the multiple entry argument help is given as [(bundle) (bundle) ... (bundle)] for more clarity.

Help Commands

/? or --help

Displays help for the system.

COMMAND /?

Displays the description for a specified command.

/g or --group

Displays commands of the specified group.

Authentication Satellite Server Commands

authentication server reconfigure (asr) [-t all|config|casa]

Reconfigures an enabled Authentication Satellite.

Examples:

To fetch the configuration files from the server:

zac asr -t config

To reconfigure the CASA signing certificate:

zac asr -t casa

To reconfigure the entire Satellite:

zac asr -t all

Bundle Commands

bundle-install (bin) [options] [bundlename | GUID | Pattern]

Installs the specified bundles based on the display name that match the specified regular expression or string, or the bundle GUID. Use the bundle-list command to get a list of the available bundles and their display names.

The following regular expressions are supported:

Regular Expression

Functionality

^abc

Matches string starting with 'abc'.

[abc]

Matches string containing 'a', 'b', or 'c'.

a*c

Matches zero or more times 'a' followed by 'c', 'ac','aac','aaac',or 'c'.

Accepts the following option:

  • -N, --dryrun - Tests and displays but does not actually perform the requested action. You can perform a dry run on a bundle version only once. This option is applicable only for the Install RPM actions of the bundle.

An example to install a bundle based on the bundle name:

zac bin bundle1

bundle-launch (bln) [bundle display name] [-noSelfHeal]

Launches the specified bundle. The actions in the Launch Action set are executed.

If you try to launch a bundle that is not installed, the bundle is first installed and then launched.

Use the bundle-list command to get a list of the available bundles and their display names.

An example to launch a bundle based on the display name:

zac bln bundle1

Example to launch a bundle based on the display name and to turn self-healing off if the launch action fails (by default, selfhealing is turned on):

zac bln bundle1 -noSelfHeal

bundle-list (bl) [options]

Displays the list of bundles assigned to the device and the logged-in user.

The output of this command is displayed in columns and provide the details of every bundle assigned or available for the managed device. The Display Name, Version, and Bundle Type columns represent the bundle display name, the version number of the bundle or sandbox if the bundle is a sandbox version, and the bundle type, respectively.The Status column displays the following states:

  • Available: Displays this state if the bundle is installed.
  • Not Installed: Displays this state if the particular bundle version is not installed.
  • Downloaded: Displays this state if the contents are downloaded but the action in the Install Action set have not been executed.

This command accepts the following options:

  • -a, --all - Lists both the filtered and non-filtered bundles. Filtered bundles are chain bundles. By default, the non-filtered bundles are displayed.
  • -g, --show-guid - Displays the bundle GUID.

An example to list all the bundles:

zac bl -a

bundle-lock-add (bla) [options] [bundlename] […]

Locks the specified bundles that match the specified regular expression or string from being upgraded or removed.

The following regular expressions are supported:

Regular Expression

Functionality

^abc

Matches string starting with 'abc'.

[abc]

Matches string containing 'a', 'b', or 'c'.

a*c

Matches zero or more times 'a' followed by 'c', 'ac','aac','aaac',or 'c'.

Accepts the following options:

  • -li, --lock-install - Locks the bundle and prevents the installation of the bundle that is specified in the lock.

NOTE:Bundle locks are applicable only for Install action set.

  • -t, --type - Specify the bundle type to be locked. The available types are linux and patch. If no type is specified, the type, bundle, is selected.
bundle-lock-list (bll)

Lists the bundle locks. The bundle locks are sorted by ID number.

Example:

zac bll

bundle-lock-remove (blr) [options] [bundleindex] […]

Removes the bundle lock that you specify by its number. You can find the number for each lock by using the bundle-lock-list (bll) command.

Accepts the following options:

  • -n - Removes the specified bundle locks by name. Ensure that the name does not contain any patterns.
  • --remove-all - Removes all bundle locks.

An example to remove a bundle lock abc:

zac blr -n abc

An example to remove all bundle locks:

zac blr --remove-all

bundle-refresh (br) [bundle display name | guid]

Refreshes information about the specified bundle.

Example:

zac br bundle1

bundle-search (bse) [options] pattern

Searches for bundles that match the specified regular expression or string.

The following regular expressions are supported:

Regular Expression

Functionality

a+bc

Matches one or more times ‘a’ followed by ‘bc’.

For example, matches one or more times ‘a’ followed by ‘abc’ or ‘aabc’.

[a-z]\*

Matches the empty string and strings with names containing only alphabetic characters.

For example, matches the empty string "", or strings with names such as acb and xyz with only alphabetic characters.

a*bc

Matches zero or more times 'a' followed by ‘bc'.

For example, matches zero or more times ‘a’ followed by ‘abc’, ‘aabc’, ‘aaabc’, or ‘bc’.

The output of this command is similar to the output of the zac bl command.

Accepts the following option:

  • -i, --installed-only - Searches only the list of installed bundles.
bundle-uninstall (bu) [bundle display name | guid]

Uninstalls the specified bundle. The actions that support the Undo action are executed while uninstalling the bundle. After the bundle uninstall is complete, the bundle state is displayed as Not Installed.

Use the bundle-list command to get a list of the installed bundles and their display names.

Example:

zac bu bundle1

bundle-verify (bv) [bundle display name]

Reinstalls the bundle and executes the Verify Action sets to ensure that no files have been removed or corrupted. Use the bundle-list command to get a list of the installed bundles and their display names.

Example:

zac bv bundle1

Certificate Commands

cert-info (ci) [ca certificate file path] [-u <username> -p <password>]

Lists public key certificate information for each known ZENworks server or adds a trusted root certificate to the device trusted store. The file can be in ASN.1 DER format or base-64 encoded delimited by ----BEGIN CERTIFICATE---- and ----END CERTIFICATE--.

Example:

To list the certificate for each known ZENworks server:

zac ci

To add a trusted root certificate to the devices trusted store:

zac ci c:\certs\mytrustcacert.der -u myuser -p mypassword

zac certificate-verify / cv

Verifies if the server certificate and key file copied to the remint repository are valid and updates the results to the server.

Collection Rollup Commands

collection-clients (crc)

Displays devices that have uploaded files to this Collection.

Example:

zac crc

collection-point (cp)

Shows the status and configuration of the collection role.

Example:

collection-point [wake]

wake - Wakes the modules that perform collection (Inventory, MD status, Message sender)

collection-queued (crq)

Displays collected files that have not yet been rolled up.

Example:

zac crq

collection-state (crs)

Displays the current state of the Satellite Collection role.

Example:

zac crs

collection-upload-orphans (cuo)

Finds orphaned files on the Satellite device and rolls them up to the parent collection server or deletes them if they have already been rolled up.

This command builds a list of the files in the folders under /var/opt/microfocus/zenworks/work/collection (except for the collectionStatsDB folder) and then tries to find the original upload information for each entry in the collection stats database.

If there is an entry for a file in the database, and it shows that the file has not been rolled up, it rolls the file up. If the entry shows that the file has already been rolled up, it deletes the file on the Satellite device. If there is no entry for a file in the database, the file is rolled up. This command also lists any files that were not uploaded or deleted.

Before running this command, you should run the zac crw command to send any pending files to the parent server.

Example:

zac cuo

collection-wake (crw)

Sends collected files to the parent server.

Example:

zac crw

Content Distribution Commands

cdp-checksum (cchk) [-l:<path to log>]

Validates satellite content by computing the checksum on each file.

The optional log file details results of the checksum comparison.

Example:

zac cchk -l:"/var/opt/novell/zenworks/logs/cchk.log"

cdp-verify-content (cvc) [-c] [-l:<path to log>]

Compares the list of content IDs and their sync states on this CDP with what the Primary Servers thinks it should have.

You can use the following options:

  • c - Computes the checksum on the local content.

Example:

zac cvc -l:"/var/opt/novell/zenworks/logs/cvc.log"

cdp-import-content (cic) <content path> [<path to log>]

Imports missing content from the directory specified by content-path, logging to the file specified by log-path.

Example:

zac cic /usr/content_Dir /var/opt/novell/zenworks/logs/cic.log

distribution-info (cdi) [option]

Displays statistical information about the Content role. You can use the following options:

  • all - Executes all options marked with *.
  • ss - Shows sync status *.
  • rs - Gets the Content Repository size *.
  • da - Lists devices that have retrieved data from this device *.
  • ne - Gets the number of content distribution errors *.
  • ds - Gets the size of data served by this device *.
  • fs - Gets the number of files served *.
  • ah [n] - Displays n (default all) entries from the access history.
  • ch - Clears the history.
  • eh <file> - Exports the access history to <file>, where the path is included and the file itself must not exist.

Examples:

zac cdi

zac cdi rs

distribution-state (cds)

Displays the state of the Satellite Content role. Displays if the role is enabled/disabled, the status (Starting, Active, Stopping, Stopped), the Parent URLs, and the replication schedule.

Example:

zac cds

distribution-wake (cdp) [cleanup | replicate [ content type(s)]]

Wakes the Content Distribution Point worker thread. You can use either of the following options:

  • cleanup - Removes any content that should no longer be stored on the Content Distribution Point.
  • replicate - Downloads any new or changed content from the Content Distribution Point’s parent ZENworks Server. One or more content types can be specified. If no content types are specified, all types will be replicated.

Examples:

zac cdp

zac cdp replicate

zac cdp linux-bundle

This command is applicable only if the agent is promoted as a Satellite Server.

The content types include:

  • Default

  • linux-bundle

  • Policy

  • Macintosh-Bundle

  • Patch-Informational-Bundles

  • zscm-policy

  • subscription-default

  • Patch-Critical-Bundles

  • Patch-System-Bundles

  • subscription-optional

  • Patch-Recommended-Bundles

  • subscription-recommended

  • Imaging

  • SystemUpdate-Agent

  • Patch-Software-Bundles

  • subscription-security

  • Windows-Bundle

    NOTE:The content types are case-sensitive.

Core Commands

get-settings (gs) <key>

Settings are downloaded by the Settings Module to the local cache on every refresh. This will return the effective settings associated with the given key.

Example:

zac gs key1

Example to list the Remote Management settings:

zac gs RemoteManagement

All the valid ZENworks settings keys are stored in the /var/opt/microfocus/zenworks/zmd/cache/settings/ directory.

get-pref (get) <preference name>

Displays the preferences that are currently set.

Example to display all preferences that are set:

zac get-pref

Example to display all preferences that have names beginning with abc:

zac get-pref abc

set-pref (set) <preference name> <preference value>

Sets the value for a preference.

Example to set the value of preference abc to 123:

zac set-pref abc 123

NOTE:If you want to configure a proxy server for a managed device, ensure that the managed device has both the proxy-host and proxy-port preferences configured. If the proxy server requires authentication, the managed device must additionally have the proxy-username and proxy-password preferences configured.

set-proxy (sp) [options] <IP address/Hostname:port>

Specifies a proxy to contact rather than contacting a ZENworks Server directly.

The options are:

  • --default - Sets a proxy that can be overriden by proxy settings from the Management Zone.
  • --clear - Clears the current proxy, but will use proxy settings from the Management Zone.
  • --ipv6 - sets an IPv6 proxy.

Examples:

IPv4:

zac sp 123.456.78.90:2349 administrator novell

zac sp /default 123.456.78.90:2349

zac sp /clear

IPv6:

zac sp /ipv6 [2001:db8:0:1:1:1:1:1]:2349 administrator novell

zac sp /default /ipv6 [2001:db8:0:1:1:1:1:1]:2349

zac sp /clear /ipv6

If a username and password is not specified, then you will be prompted to enter them.

System Update Commands

zac zeus-refresh / zeus-ref

Retrieves the system update when it is assigned to a device.

NOTE:This command is not applicable on Satellite Servers.

zac system-update-report-status / surs

Enables administrators to resend the system update status to the server immediately.

External Service Commands

These commands are used to manage external services.

external-service-add (esa) --type (type) (url) (Service Name) [Properties]

Adds external package repositories like YUM, ZYPP, or the Local directory that contains the RPMs. All the type-specific properties should start with -D.

You can list the service types that you can add by using the zac est command.

It supports the following types:

  • YUM: Adds repository of type YUM. Accepts the following properties:

    • -Dusername=value -Dpassword=value - This property is optional and is used while adding an authenticated YUM repository.
    • -DsyncExternal=true - This property is optional and is used to synchronize with the Local Package Management tool.

    For example, run the following command to add a YUM service type:

    zac esa --type YUM -Dusername=username -Dpassword=passwd https://nu.novell.com/sles11 sles11-yum-repo

  • ZYPP: Adds repository of type ZYPP. Accepts the following properties:

    • -DsyncExternal=true - This property is optional and is used to synchronize with the Local Package Management tool.

    For example, run the following command to add a ZYPP service type:

    zac esa --type ZYPP http://zypp.source.com/sles11/x86_64 sles11-zypp-repo

  • Mount: Adds a repository of type Mount. A Mount type adds a service from the Local directory that contains the RPMs. Accepts the following properties:

    • -Drecursive=(Value) - This property is optional. The valid values are true or false. If true, the RPMs are added recursively from all the directories under the specified absolute path.
    • -DsyncExternal=true - This property is optional and is used to synchronize with the Local Package Management tool.

    For example, run the following command to add packages recursively from all directories by using the Mount service type:

    zac esa --type mount -Drecursive=true file:///mnt/sles11-cd/i586 sles11-rpms

NOTE:The ZYPP or Mount services do not synchronize with the YUM Package Management Tool on Red Hat devices.

external-service-delete (esd) (index | name | url | --all)

Removes the specified external services.

The --all option deletes all the external services.

external-service-list (esl)

Lists all the external services.

The Source column displays the ZENworks Agents that were added by using the zac command and displays the ZENworks Server that was added through an External Service Policy.

The Status column displays whether the external service is active or inactive. You cannot refresh the external services that display their status as Inactive.

The State column displays whether the external service is enabled or disabled.

external-service-refresh (esr) (index | name | url | --all)

Refreshes the specified external services.

The --all option refreshes all the services.

external-service-state (ess) (enable | disable) (index | name | url | --all)

Enables or disables the specified external services.

The --all option changes the service state of all the services.

external-service-types (est)

Lists the available service types.

Imaging Commands

file-system-guid (fsg) [-d] [-r]

Removes and restores the workstation GUID in the file system in preparation for taking an image.

Example to remove the GUID from the file system:

zac file-system-guid -d

Example to restore the GUID to the file system:

zac file-system-guid -r

Example to print the GUID value:

zac fsg

Inventory Commands

inventory (inv) [scannow | cdf]

Runs an inventory scan or opens the Collection Data Form.

Example to run an inventory scan:

zac inv scannow

Example to open the Collection Data Form:

zac inv cdf

Inventory-Only Commands

These commands are used only for Inventory-Only Agents (IOA).

zac ioa cfg <server ip>

Configures the Linux Inventory-Only Agent (IOA) device to the mentioned server ip. To ensure that only authorized Inventory-Only Agents (IOA) are registered to the zone, you should provide an Authorization Key in this command. If you do not have an Authorization Key, then the device should be pre-approved before executing this command.

Example to configure an Inventory-Only agents using an authorization key:

zac ioa cfg <ip_address>"auth_key"

zac ioa version

Displays the version of the Inventory-Only Agent (IOA).

inventory (inv) [scannow]

Runs an inventory scan.

An example to run an inventory scan:

zac inv scannow

Local User Management Commands

These commands are used to manage local users and their privileges.

user-add (ua) (username)

Adds a local user to the ZENworks privilege store.

Example:

zac ua username

user-delete (ud) (username)

Deletes a local user from the ZENworks privilege store.

Example:

zac ud username

user-list (ul)

Lists the following:

  • - User names and privileges for the local users added to the ZENworks privilege store.
  • - Privileges for the local users not added to the ZENworks privilege store (default user). The default user is represented by * (asterisk).

Example:

zac ul

user-edit (ue) (username) [+/-Privilege]

Edits the local user privileges. You use + (plus) to add a new privilege and - (minus) to remove an existing privilege.

By default, a newly created local user has the View privilege. The local users that are not added to the ZENworks privilege store inherit the privilege assigned to the default user that is represented by * (asterisk). You can change the privileges assigned to any local user and assign the user the following privileges:

Privilege

Functionality

View

View or list the information on bundles, policies, configuration, and so on.

Install

Install or uninstall bundles, policies, packages, and so on.

Configure

Run the configuration commands.

SuperUser

Execute all the zac commands because a SuperUser is assigned all the privileges. By default, the root user is assigned the SuperUser privilege, which cannot be modified.

Examples:

If you want to allow the local users in the ZENworks privilege store to view, install, and uninstall bundles and policies, you can assign the View and Install privileges to these users by running the following command:

zac ue username +Install

If you want to allow the local users that are not added to the ZENworks privilege store to view, install, and uninstall bundles and policies, you can assign the View and Install privileges to to the * user by running the following command:

zac ue '*' +Install

user-privilege-export (upe) (.xml filename)

Exports a list of local users and their privileges to a specified .xml file for reusing this list on other managed devices.

Example:

zac upe /tmp/privileges.xml

After exporting the list, you can import it to other managed devices by running the user-privilege-import (upi) command.

user-privilege-import (upi) (.xml filename)

Imports a list of local users and their privileges to other managed devices from a specified .xml file. This list can be exported to the .xml file by running the user-privilege-export (upe) command.

Example:

zac upi /tmp/privileges.xml

Location Commands

config-location (cl)

Displays the configuration location. The configuration location determines which ZENworks server (or servers) the device connects to for authentication, configuration, content, and collection purposes.

Examples:

zac config-location

zac cl

location-create (lc) (location name) [-d|--desc=<description>] [network environment name] [...]

Creates a location and (optionally) assigns network environments to the location.

(location name) - The name you want assigned to the new location.

[network environment name] - The name of an existing network environment that you want to assign to the location. You can add multiple network environments. Adding network environments during creation of a location is optional. You can use the location-nwenv-assign command to add network environments after creation.

[network environment name] - The name of an existing network environment that you want to assign to the location. You can add multiple network environments. Adding network environments during creation of a location is optional. You can use the location-nwenv-assign command to add network environments after creation.

Accepts the following options:

-d |--desc=description: Specify a description for the location.

-t | -- downloadThrottle=Download Throttle rate: Specify a download throttle rate.

-u | -- uploadThrottle=Upload Throttle rate Specify an upload throttle rate.

-a | -- auditUpload=Audit upload data Specify 0 to enable or 1 to disable the audit upload data.

-e | -- Preferred protocol for communication Based on your preferred protocol for communication, specify either IPv4 or IPv6.

Specify IPv4 if you want the devices in this location to try communicating with the servers using IPv4 URLs first before attempting IPv6 URLs.

Specify IPv6 if you want the devices in this location to try communicating with the servers using IPv6 URLs first before attempting IPv4 URLs.

C | -- cifsServer=CIFS Server: Specify a CIFS server that allows you to provide share access.

-i | --proxyAddress=IPv4 HTTP Proxy Address Specify an IPv4 proxy address.

-p | --proxyPort= IPv4 HTTP Proxy Port: Specify the port number on which the proxy server should listen.

-r | --proxyCidr=IPv4 HTTP Proxy CIDR: Specify the range of IPv4 address using CIDR notation.

-x | --ipv6ProxyAddress=IPv6 HTTP Proxy Address Specify an IPv6 proxy address

-y –ipv6ProxyPort=IPv6 HTTP Proxy Port: Specify the port number on which the proxy server should listen.

-z | -- ipv6ProxyCidr=IPv6 HTTP Proxy CIDR: Specify the range of IPv6 address using CIDR notation.

location preferred protocol communication | lppc <location name> [options]

Edits an existing location.

<location name>: Specify a name for the location.

Accepts the following options:

IPv4: Specify IPv4 if you want the devices in this location to try communicating with the servers using IPv4 URLs first before attempting IPv6 URLs.

IPv6: Specify IPv6 if you want the devices in this location to try communicating with the servers using IPv6 URLs first before attempting IPv4 URLs.

Logging Commands

logger [resetlog | level [MANAGED|ERROR|WARN|INFO|DEBUG] | managedlevel]

Changes the logger configuration.

You can use the following options:

  • resetlog - Resets the log.
  • level - If used without a level, displays the current managed logging level. If used with one of the levels, changes the logging level to the specified level.
  • managedlevel - Displays the Global Log level of the zone.

Example to reset the log file:

zac logger resetlog

Example to show the current log level:

zac logger level

Example to set the log level to DEBUG and above:

zac logger level DEBUG

Package Management Commands

checkpoint-add (cpa) (name) [date]

Adds a checkpoint. If the date is not specified, adds a check point with the current date.

checkpoints-list

Lists the saved checkpoints.

checkpoint-remove (cpr) (name) […]

Removes the specified checkpoints.

info (info) [option] pattern

Displays package information for the specified package that matches the specified pattern.

The following regular expressions are supported:

Regular Expression

Functionality

^abc

Matches string starting with 'abc'.

[abc]

Matches string containing 'a', 'b', or 'c'.

a*c

Matches zero or more times 'a' followed by 'c', 'ac','aac','aaac',or 'c'.

The command displays the Name, Version, Architecture, and Description of the packages.

Accepts the following options:

  • --provides - Lists packages and files that is provided by the package that matches the specified pattern.
  • --requires - Lists packages and files that is required by the package that matches the specified pattern.
install (in) [options] (package name) […]

Installs the specified packages. If you specify a package with a version, the exact version of the package is installed. If you specify a package with a name, the best version of the package is installed.

NOTE:If you want to downgrade a package, specify the version to which you want to downgrade the package.

Accepts the following options:

  • -b, --bundle [bundle name] - Installs a package from the specified bundle. The bundle that you specify can also be a Linux Dependency Bundle. However, to install a Linux Dependency Bundle, the Publish Packages should be set to True. For more information on Publish Packages, see Creating Linux Dependency Bundles.
  • -d, --download-only - Downloads packages to the zen cache directory. By default, the zen cache directory is located in /var/opt/microfocus/zenworks/zmd/cache.
  • -N, --dry-run - Tests and displays the requested actions but does not actually perform them.
  • -y, --no-confirm - Does not prompt for confirmation.
  • -f, --freshen - Installs packages only if an earlier version of the package exists.
  • -s, --service [service name] - Installs a package from the specified service.
  • -p, --pattern [pattern name] - Installs a package of a specified pattern. However, only the mandatory packages part of the pattern is installed.
  • --entire-bundle [bundle name] […] - Installs all packages from the specified bundles. You can specify a single bundle or multiple bundles.
  • --ignore-dependency - Does not check for dependency. The dependant packages are skipped and only the packages are installed.
  • -r, --regex-pattern <regex pattern> [<regex pattern>]- Installs all the packages that match the specified regular expression.

The following regular expressions are supported:

Regular Expression

Functionality

^abc

Matches string starting with 'abc'.

[abc]

Matches string containing 'a', 'b', or 'c'.

a*c

Matches zero or more times 'a' followed by 'c', 'ac','aac','aaac',or 'c'.

Additionally, the command also lists the dependent packages to successfully complete the installation.

list-updates (lu) [options] [bundle name|service name] […]

Displays available updates in the specified bundles and services. You can specify a single bundle or service, or multiple bundles or services for which you want to display the updates. If no bundle or service is specified, the command displays all the available updates.

Accepts the following option:

  • -t, --type [type] - Lists updates from the specified service type.
lock-add (la) (name or pattern)[version]

Adds a package lock rule. This command locks the specified packages, which if they match the specified regular expression or string, are not upgraded or removed. The package name can be specified individually, with wildcard patterns, or even with version number relations. The version number should be specified within single or double quotes.

Relational Operator

Functionality

=

Locks only the specific package version.

<

Locks all versions of the package older than the specified version, excluding the specified version.

>

Locks all versions of the package later than the specified version, excluding the specified version.

<=

Locks all versions of the package older than the specified version, as well as the specified version.

>=

Locks all versions of the package later than the specified version, as well as the specified version.

If you want to install a specific version of the package, this command first checks if the package version has been locked, then installs the package version only if it is not locked. For example, assume that all the later versions of the package “X 1.7” have been locked by using the zac la X '>' 1.7 command. If you try to install the X 1.9 package by using the zac in X (1.9) command, the installation fails.

lock-delete (ld) (lock number) […]

Deletes the package lock that you specify by its number. You can find the number for each lock with the lock-list (ll) command.

lock-list (ll)

Lists the package locks.

packagehistory (ph) [options] […]

Lists package transaction history that is performed by using ZENworks. This command displays the package name, date, operation, version, and release.

Accepts the following option flags:

  • -n, --search-name [package name] - Searches by package name
  • -a, --search-action [action name] - Searches by action name. The valid action names are None, Install, Removal, and Upgrade.
  • -d, --days-back [days] - Maximum number of days to look back (default 30).
  • -c, --clean-history - Cleans package history.
  • -o, --search-operation [operation] - Searches based on the operation performed. The operation performed can be Install, Removal, or Upgrade.
remove (rm) [options] (package name) […]

Removes the specified packages.

Accepts the following options:

  • --entire-bundle [bundle name] - Removes all the packages from the specified bundle.
  • -N, --dry-run - Tests and displays but does not actually perform the requested actions.
  • -y, --no-confirm - Does not prompt for confirmation.
  • -r, --regex-pattern <regex pattern> [<regex pattern>] - Removes all the packages matching the specified regular expression.

The following regular expressions are supported:

Regular Expression

Functionality

^abc

Matches string starting with 'abc'.

[abc]

Matches string containing 'a', 'b', or 'c'.

a*c

Matches zero or more times 'a' followed by 'c', 'ac','aac','aaac',or 'c'.

Additionally, this command also lists the dependent packages to successfully complete the removal of the specified package.

rollback (ro) [options] [date or check point]

Rolls back package transactions to the time and date you specify, if the rollback preference is set. By default, the rollback preference is disabled. You can enable the rollback preference by running the zac set rollback true command.

If you want to roll back to a particular version of the package, that version of the package and its dependencies should be available as part of the service or the assigned bundle. If the version of the package or its dependencies is not available, the rollback fails.

Additionally, this command also lists the dependent packages that are required to successfully roll back.

Accepts the following options:

  • -d, --download-only - Only downloads packages.
  • -N, --dry-run - Tests and displays but does not actually perform the requested actions.
  • -y, --no-confirm - Does not prompt for confirmation.
  • -p, --package (package name) - Name of the package that needs to be rolled back.
search (se) [options] [pattern]

Searches for packages that match the specified pattern. If no arguments are provided, it displays all the packages. This command displays the source name, source type, package name, version, and architecture.

Accepts the following options:

  • -b, --bundle [bundle name] - Searches packages in the specified bundle.
  • -d, --search-in-description - Searches in package descriptions but not package names.
  • -i, --installed-only - Shows only installed packages.
  • -u, --uninstalled-only - Shows only uninstalled packages.
  • -s, --service [service name] - Searches packages in the specified service.
  • -t, --type [service type] - Searches packages, based on the specified service type.
  • -p, --pattern [pattern name] - Shows the available patterns.
  • --sort-by-bundle - Sort packages by bundle, not by name. Default sorting is by package name.
  • --show-nevra - Shows the NEVRA details of the packages.
update (up) [options] [bundle name|service name] […]

Updates the installed packages. You can specify a single bundle or service name, or multiple bundles or service names, for which to update the packages. If no bundle or service name is specified, all the packages are updated.

If there are installed packages that have the same name and architecture but different versions, only packages with the higher version are upgraded.

Accepts the following options:

  • -d, --download-only - Only downloads packages.
  • -N, --dry-run - Tests and displays but does not actually perform the requested actions.
  • -y, ---no-confirm - Does not prompt for confirmation.
  • -t, --type [service-type] - Updates packages from the specified external service type.
what-provides (wp) pattern

Displays packages that provide the library, program, or package that matches the specified pattern. Only the * wildcard pattern is supported.

Example to display the packages ending with a:

zac wp *a

what-requires (wr) pattern

Lists packages that require the library, program, or package that matches the specified pattern.

An example to display packages starting with a:

zac wr a*

Patch Management Commands

patch-scan (ps)

Scans the device for patches that are not applied, using the device's current patch signature (DAU) file. The results are then uploaded to the server.

An example to run a patch scan:

zac ps

patch-scan --quick (ps --quick)

Uploads the last scan results to the server; it does not run a new detection scan.

An example to run a quick patch scan:

zac ps --quick

patch-scan --complete (ps --complete)

Scans the device for patches that are not applied, using an updated patch signature (DAU) file. The results are then uploaded to the server.

An example to run a complete patch scan:

zac ps --complete

patch-apply-policy (pap)

Updates devices with the latest version of all patch policies.

An example to run a patch apply policy:

zac pap

If you want to update the device with one or more patch policies, specify the patch policy names or IDs. An example: zac pap patch1 patch2

patch-quarantine-release (pqr)

Releases any quarantined patches on the device where the command is run from quarantine so that a one-time installation attempt can occur, either from a patch policy schedule or a remediation schedule.

An example to run a patch quarantine release:

zac pqr

patch-distribute-policy, pdp

Distribute all patch policies to the device. This will attempt to distribute all patches that do not match the policy.

patch-distribute-policy, pdp

Distribute all patch policies to the device. An example to run a patch distribution policy: zac pdp

If you want to distribute one or more patch policies to the device, specify the patch policy names or IDs. An example: zac pdp patch1 patch2

patch-download, pd

Downloads the content associated with the specified patch names.

Syntax: zac patch-download (pd) [options]

The following are the available options:

--patch: Name of the patches that should be installed. If you want to install multiple patches, then specify the name of the patches separated by a comma.

Example: zac pd --patch patch_name1, name2, name3

patch-download-catalog, pdc

Downloads the catalog used for scanning the patches.

Syntax: zac patch-download-catalog (pdc)

patch-export-catalog, pec

Exports the patch details in the catalog to the PatchMetadata.csv file.

Syntax: zac patch-export-catalog (pec)

patch-install, pi

Installs the downloaded patches.

Syntax: zac patch-install (pi) [options]

The following are the available options:

--patch: Name of the patch that should be installed.

Example 1: zac pi --patch name

patch-list, plp

Lists all the required patches.

Syntax: zac patch-list (plp) [options]

The following are the available options:

--all: List all the patches, including the installed patches.

policy-list, pl

This command returns a list of the policies that are currently enforced on the device. By default, this displays the effective (non-filtered) policies.

zac pl –all

Displays both filtered and non-filtered policies.

Policy Commands

policy-list (pl)

Lists the policies that are currently being enforced on the device (effective policies). To list all policies (effective and non-effective), use the --all option.

Examples:

zac pl

zac pl --all

policy-refresh (pr)

Applies all of the policies assigned to the device and user.

Example:

zac pr

Registration Commands

add-reg-key (ark) <registration key>

Registers the device by using the specified key. Registration with keys is additive. If the device has previously been registered with a key and you register it with a new key, the device receives all group assignments associated with both keys.

Example:

zac ark key12

register (reg) [-g] [-r] <option-1 or option-2> [-u <username> -p <password] <ZENworks Server address:port>

Option 1: [-a <authorization key>]

Option 2: [-k <RegKey>] <ZENworks Server address:port>

Registers the device in a Management Zone.

To execute this command you must have Create/Delete device rights for the folder that you are attempting to register.

You can use the following options:

  • g - Lets you create a new device object with a new GUID and password for the device if you have multiple devices with the same GUID. When you register a device by using this switch, all the associations (policies and bundles) assigned to the original device object are removed. You cannot use this option to create a new GUID for a Primary Server or a Satellite device. The local user must have Local Administrator rights to use this option.
  • k - Lets you register the device using the specified registration key.
  • p - Lets you specify the Management Zone administrator’s password.
  • u - Lets you specify the Management Zone administrator’s username.
  • a - Lets you specify the authorization key to authorize the device.
  • r - Lets you to reset the device password and then register the device.
  • The Authorization key is stored locally in the ZENworks agent. The key can be added/updated in the agent using this option.
  • This option cannot be used along with the other options.

Examples:

zac reg -k key1 https://123.456.78.90

zac reg -k key1 -u administrator -p novell https://zenserver.novell.com:8080

To add or modify the authorization key:

zac register -a c24e-b9b42

c24e-b9b42 is the authorization key.

The port number is required only if the ZENworks Server is not using the standard HTTP port. If a username and password are not supplied, you are prompted for them.

NOTE:

  • The -g and -k options will not be honored if the corresponding device object is already present on the server and reconciliation takes place with that device object.

  • When you modify or update the GUID using the -g option, then audit and messages generated with the old GUID will be lost.

reregister (rereg)[-u <username> -p <password>] <new guid>

Registers a device in the current zone and assigns it the GUID of an existing device object. The currently associated device object is deleted. To execute this command you must have Create/Delete device rights for the folder you are attempting to reregister.

For example, if you image a device after replacing the hard drive, the device might get a new GUID. However, by using the reregister command, you can assign the same GUID that it had before you replaced the hard drive.

Examples:

To reregister, specify a username and password:

zac reregister -u myuser -p mypassword eaa6a76814d650439c648d597280d5d4

To reregister and be prompted for a username and password:

zac reregister eaa6a76814d650439c648d597280d5d4

NOTE:

  • The -g and -k options will not be honored if the corresponding device object is already present on the server and reconciliation takes place with that device object.

  • When you modify or update the GUID using the -g option, then audit and messages generated with the old GUID will be lost.

unregister (unr) [-f] [-s] [-a] [-u <username> -p <password>]

Removes the device’s registration from the Management Zone. To execute this command you must have Create/Delete device rights for the folder you are attempting to unregister.

Example:

To force a device to unregister locally when a server cannot be contacted:

zac unr -f -u myuser -p mypassword

To unregister locally and suppress prompting for a user name and password:

zac unr -s

Use -a option to unregister asynchronously. With this option server deletes the device asynchronously.

The -a, -f, -u, and -p parameters are optional. If you don’t use the -u and -p parameters, you are prompted to enter a username and password. If -a option is specified, ZENworks server returns the unregister call quickly, but deletes the device object asynchronously from the database at a later point of time. If your device deletion is not complete and tries to register the device again, then the ZENworks server displays an error. If there is large amount of data associated with the device in the database, it might take long time to delete the device. Ensure that -a option is used when actual device deletion on server takes long time and causes the agent unregister command to timeout.

NOTE:Running the UNR command might cause high utilization of the database. This might be due to any of the following reasons:

  • The UNR command is running on the server.

  • The zone contains a large number of managed devices.

  • The managed devices have a huge history.

  • Patch Management is enabled.

reestablish-trust (retr) [-u <username> -p <password>]

Reestablishes trust with the current Management Zone. The username and password used must be of the Zone Administrator.

Example:

zac retr -u myuser -p mypassword

The -u and -p parameters are optional. If you don’t use the -u and -p parameters, you are prompted to enter a username and password.

Satellite Role Commands

remint-satellite-cert (rsc)

Remints the SSL certificate for Satellite Servers and reconfigures the Jetty web server.

Example: zac rsc

satellite-cachecfg (satcfg)

Reads Satellite roles from cache.

Example:

zac satcfg

satellite-clearcache (satcc)

Clears Satellite configuration information from cache.

Example:

zac satcc

satellite-refreshcfg (satrc)

Refreshes Satellite roles.

Example:

zac satrc

satellite-roles (satr)

Reports on current Satellite roles and their state.

Example:

zac satr

imgsatserver status (iss status)

Displays the device’s imaging role properties, including its current status, PXE service status, image files, and imaging statistics.

Current Status: Displays whether your device is currently configured to perform Imaging operations. The current status is Active when the device is promoted to a satellite with the Imaging role.

PXE Service Status: Displays whether the Proxy DHCP service is enabled on the device.

PXE Requests: The number of imaging requests of any kind that have been received by the Imaging Server since it was last started. This includes requests that failed, were denied, or were referred to other Imaging Servers. Information about each of these requests, such as the source, type, date/time, and results, is logged on the Imaging Server.

Images Sent: The number of images that the Imaging Server has sent to imaging clients since the Imaging Server was last started. This includes only images that were retrieved from this Imaging Server.

Images Received: The number of new images that have been received and stored on the Imaging Server since it was last started. This includes images that were received through client referrals.

Example:

zac iss status

Status Commands

agent-properties (agp)

Provides information about the ZENworks Agent. The following fields provide information about the ZENworks Agent:

Device Address. The IP address of your device.

Device Name. The computer name for your device.

Device State. The state of the device - Managed, Unmanaged, Retired, or Unknown. The Unknown state is displayed only if there is an error.

Last Contact With Server. The last time the ZENworks Agent contacted the ZENworks Server.

Next Contact With Server. The time scheduled for the ZENworks Agent to contact the ZENworks Server.

Primary User. The currently logged in user.

Example:

zac agp

zac agent-properties

cache-clear (cc)

Clears the ZENworks cache on the device. This removes all entries in the cache database and deletes any cache files associated with those entries.

Example:

zac cc

info-collect (zeninfo) [<targetfile>]

Collects ZENworks support information, including cache data, configuration data, debug logs, product installation information, refresh times, status events, and basic system information. The information is packaged into a ZIP file and placed in the location you specify. If you do not specify a location, ${TMPDIR}\zeninfo-${DateTime}.zip is used. If you are experiencing problems with a managed device, Micro Focus Support might ask you to run this command and send the resulting ZIP file to Micro Focus to help troubleshoot your problem.

To run the zeninfo process in the background, run the following command.

zac zeninfo /tmp/zeninfo/ & echo $! > /tmp/zeninfo/zeninfo.pid

To stop the zeninfo process, run the following command:

kill `cat /tmp/zeninfo/zacinfo.pid`

refresh (ref)[general [bypasscache] | partial [bypasscache] | bypasscache]

Initiates a general refresh to refresh all registration and configuration settings; or initiates a partial refresh to refresh all registration and configuration settings.

Use bypasscache to avoid using data from the server cache during the refresh. This option is useful for testing or troubleshooting.

Examples:

zac ref general bypasscache

zac ref partial bypasscache

zac ref bypasscache

zenhttp-status(zhs)

Lists port and status of the web server.

Example:

zac zhs

zone-config (zc)

Displays information about the ZENworks Server that the device is accessing for configuration information (the Configuration server) or lists the information for the Configuration server.

Examples:

zac zc

get-settings (gs) <key>

Settings are downloaded by the Settings Module to the local cache on every refresh. This will return the effective settings associated with the given key.

Example:

zac gs key1

All valid ZENworks settings keys are stored in the /var/opt/microfocus/zenworks/zmd/cache/settings/ directory.

Example to list the Remote Management settings:

zac gs RemoteManagement

statussender (sts)

This command rolls up status information to the Primary Server. You can either roll up information that was updated since the last time the status was rolled-up or you can roll up the complete status information.

Examples:

To roll up status information that was updated since the last successful status roll up:

zac sts rollup

To roll up complete status information:

zac sts rollup full