---
name: "myproxy-admin-query"
section: "8"
platform: "linux"
package: "myproxy-admin"
version: "6.2.16-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/myproxy-admin-query"
---

# myproxy-admin-query(8)

query MyProxy repository contents

## NAME

myproxy-admin-query - query MyProxy repository contents

## SYNOPSIS

**myproxy-admin-query** \[ *options* \]

## DESCRIPTION

The **myproxy-admin-query** command displays information about the credentials stored in the MyProxy repository. It can also be used to remove credentials from the repository, by combining query options with  **--remove**. It accesses the repository directly and must be run on the machine where the [**myproxy-server**(8)](/myproxy-server/8.md) is installed from the account that owns the repository.

An example cron job for running **myproxy-admin-query** periodically to remove invalid (expired, revoked, etc.) credentials from the repository is provided at *$GLOBUS\_LOCATION/share/myproxy/myproxy.cron*.

## OPTIONS

- **-h, --help**

  Displays command usage text and exits.

- **-u, --usage**

  Displays command usage text and exits.

- **-v, --verbose**

  Enables verbose debugging output to the terminal.

- **-V, --version**

  Displays version information and exits.

- **-l** *username,* **--username** *username*

  Return information on credentials for a single username.  By default, the command returns information on all credentials for all usernames.

- **-k** *name,* **--credname** *name*

  Return information on the credentials with the specified name.

- **-o** *DN,* **--owner** *DN*

  Return information on the credentials owned by the specified distinguished name.

- **-e** *hours,* **--expiring\_in** *hours*

  Return information on credentials with remaining lifetime less than the specified number of hours.  For example,  **-e** *0* will return all expired credentials.

- **-t** *hours,* **--time\_left** *hours*

  Return information on credentials with remaining lifetime greater than the specified number of hours.

- **-i, --invalid**

  Return information on invalid (expired, revoked, etc.) credentials.

- **-s** *dir,* **--storage** *dir*

  Specifies the location of the credential storage directory. The directory must be accessible only by the user running the  **myproxy-server** process for security reasons.  Default: /var/lib/myproxy or /var/myproxy or $GLOBUS\_LOCATION/var/myproxy

- **-c** *file,* **--config** *file*

  Specifies the location of the **myproxy-server** configuration file, for OCSP options. Default: /etc/myproxy-server.config or $GLOBUS\_LOCATION/etc/myproxy-server.config

- **-r, --remove**

  Remove the credentials matching the query from the repository. For example,  *myproxy-admin-query -e 0 -r* will remove all expired credentials from the repository.

- **-L** *'msg',* **--lock** *'msg'*

  Places the credentials matching the query under an administrative lock and specifies a message to be returned on access attempts. Be sure to put the message in quotes so it is captured as one argument to the command.

- **-U, --unlock**

  Removes any administrative locks for the credentials matching the query.

## EXIT STATUS

0 on success, \>0 on error

## AUTHORS

See  **http://grid.ncsa.illinois.edu/myproxy/about** for the list of MyProxy authors.

## SEE ALSO

[**myproxy-change-pass-phrase**(1)](/myproxy-change-pass-phrase/1.md), [**myproxy-destroy**(1)](/myproxy-destroy/1.md), [**myproxy-init**(1)](/myproxy-init/1.md), [**myproxy-logon**(1)](/myproxy-logon/1.md), [**myproxy-retrieve**(1)](/myproxy-retrieve/1.md), [**myproxy-store**(1)](/myproxy-store/1.md), [**myproxy-server.config**(5)](/myproxy-server.config/5.md), [**myproxy-admin-adduser**(8)](/myproxy-admin-adduser/8.md), [**myproxy-admin-change-pass**(8)](/myproxy-admin-change-pass/8.md), [**myproxy-admin-load-credential**(8)](/myproxy-admin-load-credential/8.md), [**myproxy-server**(8)](/myproxy-server/8.md)
