Update the DBFS Wallet Password

After you update the schema password, the Oracle Database File System (DBFS) mount point does not work because its wallet is not synchronized with the credentials and fails to mount. To avoid this problem, you must regenerate the DBFS wallet with a new password. You can update the DBFS wallet password using an automation script or perform the steps manually.

Update the Wallet Password Using an Automation Script

To update the wallet password using an automation script:

  1. Use the ssh command to connect to the Administration Server VM (as the opc user):

    ssh -i private_key opc@VM_IP_address

  2. Change to the oracle user:

    sudo su - oracle

  3. Navigate to the directory containing automation scripts:

    cd /opt/scripts/runbooks

  4. Run the script to update the DBFS wallet password and respond to the prompts RCU schema prefix and RCU password:

    ./updateDBFSWallet.sh

  5. To verify if the wallet is updated with the new password, enter the following command:

    $middleware_home/oracle_common/bin/mkstore -wrl /u01/data/domains/domain_name/dbfs/wallet -listCredential

    The output should list the DBFS user name and look as follows:

    Oracle Secret Store Tool : Version 12.2.1.3.1 
    Copyright (c) 2004, 2019, Oracle and/or its affiliates. 
    All rights reserved.
    Enter wallet password: 
    List credential (index: connect_string username) 
    1: ORCL SP12944567290_DBFS
  6. Repeat these steps on all nodes of the Managed Server.

Update the Wallet Password Manually

To update the wallet password manually:

  1. Use the ssh command to connect to the Administration Server VM (as the opc user):

    ssh -i private_key opc@AdminServerVM_IP_address
    sudo su - oracle
  2. Change to the oracle user:

    sudo su - oracle
  3. Go to the DBFS directory:
    /u01/data/domains/domain_name/dbfs
  4. Back up the old wallet:
    mv wallet wallet_bckup
  5. Create a new wallet directory:
    mkdir wallet
  6. Create a temp file to store the prefix_DBFS user credentials. For example:
    vi /var/tmp/dbfsp
  7. In the file, enter the new database credentials three times in the dbfsp file on three different lines.
    ab#$12CDaf40f1c
    ab#$12CDaf40f1c
    ab#$12CDaf40f1c

    If you need to find out the default database credentials, see Discover the Default Database Schema Prefix and Password.

  8. Save the file.
  9. Enter the following commands to generate the Oracle Wallet at /u01/data/domains/domain_name/dbfs:
    $middleware_home/oracle_common/bin/mkstore -wrl /u01/data/domains/domain_name 
    /dbfs/wallet -create < /var/tmp/dbfsp

    Note:

    If you see the following exception, rerun the mkstore command from a new terminal:
    Exception in thread "main" java.lang.UnsupportedClassVersionError:
    oracle/security/pki/OracleSecretStoreTextUI : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method)
  10. Enter the following commands to add the new credentials in the wallet. In this example, SchemaPrefix_DBFS is the DBFS user name:
    $middleware_home/oracle_common/bin/mkstore -wrl /u01/data/domains/domain_name/dbfs/wallet 
    -createCredential ORCL SchemaPrefix_DBFS < /var/tmp/dbfsp
  11. To verify if the wallet is updated with the new password, enter the following command:
    $middleware_home/oracle_common/bin/mkstore -wrl /u01/data/domains/domain_name/dbfs/wallet -listCredential

    The output should list the DBFS user name and look as follows:

    Oracle Secret Store Tool : Version 12.2.1.3.1 
    Copyright (c) 2004, 2019, Oracle and/or its affiliates. 
    All rights reserved.
    Enter wallet password: 
    List credential (index: connect_string username) 
    1: ORCL SP12944567290_DBFS
  12. Repeat these steps on all nodes of the Managed Server.