Updated on 2026-06-24 GMT+08:00

Initializing obsfs

Before using obsfs, you need to write the access keys (AK and SK) into the key file, enabling user authentication before using parallel file systems.

This topic describes how to write the access keys to the /etc/passwd-obsfs file.

Prerequisites

You have obtained the access keys (AK and SK). For details, see Resource Preparation.

Procedure

  1. Open the CLI.
  2. Run the following command to write the access keys into the /etc/passwd-obsfs file:

    echo AK:SK > /etc/passwd-obsfs

  3. Run the following command to check whether the key information is successfully configured:

    cat /etc/passwd-obsfs

  4. Run the following command to set the key file to be used only by the current user:

    chmod 600 /etc/passwd-obsfs

    To prevent AK/SK leakage from impacting your services, use the official software package that supports encrypted AK/SK pairs. If you still need to use plaintext AK/SK pairs, use a temporary AK/SK pair or rotate the AK/SK pair regularly. AK/SK pairs can be updated dynamically without interrupting services. Make sure to delete any key files that are no longer in use.