Skip to main content

Change Password

Changes the owner or user password of an encrypted PDF file without fully decrypting and re-encrypting it.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • PDF Path - Path to the PDF file whose password will be changed.

Options

  • New Password - The new password to set for the PDF. This replaces the existing owner or user password.
  • PDF Path to Save - Output path where the modified PDF will be saved. If not provided, the original file is updated in place.
  • Mode - Encryption algorithm used by the PDF. Options: AES or RC4. Default is AES.
  • Key Length - Encryption key length in bits. Options: 40, 128, or 256. Default is 256.
  • Change Owner or User - Specifies which password to change. Options: User or Owner. Default is User.
  • Owner Password - Current owner password for the PDF. Required for verification.
  • User Password - Current user password for the PDF. Required for verification.
note

You must provide the current password(s) to change to a new password. The mode and key length should match the current encryption settings.

Output

This node does not produce any output variables. The PDF with changed password is saved to the specified path or overwrites the original.

How It Works

The Change Password node modifies password protection on PDF files. When executed, the node:

  1. Validates the input PDF path
  2. Retrieves current owner and user passwords from credentials
  3. Retrieves the new password from credentials
  4. Verifies the current encryption settings (mode and key length)
  5. Authenticates using the current passwords
  6. Changes either the owner or user password to the new password
  7. Saves the modified PDF to the output path or overwrites the original

Password Types

User Password

  • Required to open and view the PDF
  • Can be changed using this node
  • After change, new password is required to open the document

Owner Password

  • Grants full permissions including changing security settings
  • Can be changed using this node
  • After change, new password is required for administrative operations

Use Cases

  • Security Updates: Rotate passwords periodically for security compliance
  • Access Management: Update passwords when access requirements change
  • Password Reset: Reset forgotten or compromised passwords
  • Automated Password Rotation: Implement automatic password rotation policies
  • User Management: Update user passwords when personnel changes occur
  • Compliance: Meet password rotation requirements for sensitive documents

Example Workflows

Change User Password

  1. Retrieve current user password from Vault
  2. Generate or retrieve new password
  3. Use Change Password node to update user password
  4. Store new password in Vault
  5. Notify users of password change

Rotate Owner Password

  1. Set "Change Owner or User" to "Owner"
  2. Provide current owner password
  3. Set new owner password
  4. Update password management system

Periodic Password Rotation

  1. Schedule workflow to run monthly
  2. Generate new secure password
  3. Change password on encrypted PDFs
  4. Update password storage system
  5. Notify administrators

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid PDF path
  • PDF file not found at the specified path
  • PDF file is not encrypted
  • Incorrect current password(s) provided
  • New password retrieval fails from credential system
  • New password is missing or invalid
  • Incorrect encryption mode or key length specified
  • Insufficient permissions to read the PDF file
  • Insufficient permissions to write to output path or overwrite original

Usage Notes

  • Original PDF remains unchanged when an output path is specified
  • Without an output path, the original file is updated with new password
  • You must provide correct current passwords for authentication
  • The mode and key length must match the current encryption settings
  • After password change, the old password no longer works
  • The new password must be provided through credential system
  • Encryption settings (mode, key length) remain the same
  • Only the specified password (owner or user) is changed

Tips for Effective Use

  • Backup First: Always backup files before changing passwords in place
  • Use Vault: Store all passwords securely in Robomotion Vault
  • Test New Password: Verify the new password works by opening the PDF
  • Document Changes: Keep a log of password changes for audit purposes
  • Separate Output: Use output path to preserve original encrypted file
  • Match Settings: Ensure mode and key length match current encryption
  • Strong Passwords: Use strong, complex passwords for better security
  • Secure Communication: Share new passwords securely with authorized users
  • Immediate Testing: Test new password immediately after change

Password Management Best Practices

  1. Strong Passwords: Use passwords with at least 12 characters including mixed case, numbers, and symbols
  2. Unique Passwords: Don't reuse passwords across multiple documents
  3. Secure Storage: Always store passwords in Vault, never hardcode them
  4. Regular Rotation: Change passwords periodically for sensitive documents
  5. Access Control: Limit who can change passwords
  6. Audit Trail: Log all password change operations
  7. Testing: Verify new passwords before deleting old password records
  8. Documentation: Maintain secure documentation of which passwords are used where

Common Issues and Solutions

Issue: Current Password Incorrect

Solution:

  • Verify current password is correct
  • Check that password is properly stored in Vault
  • Ensure you're providing the right password type (owner vs user)

Issue: Cannot Set New Password

Solution:

  • Verify new password credential is configured correctly
  • Check that new password value is not empty
  • Ensure new password meets any complexity requirements

Issue: Password Changed But Can't Open PDF

Solution:

  • Verify which password type was changed (owner vs user)
  • If user password was changed, use new user password to open
  • If owner password was changed, user password still opens the document

Issue: Incorrect Mode or Key Length

Solution:

  • Try different combinations (AES/256 is most common)
  • Check encryption settings with PDF properties
  • Contact the document creator for encryption details

Encryption Settings

The mode and key length must match the current encryption:

ModeKey LengthCommon Usage
AES256-bitModern PDFs (most common)
AES128-bitStandard PDFs
RC4128-bitOlder PDFs
RC440-bitLegacy PDFs (rare)

Security Considerations

  1. Secure Password Storage: Never expose passwords in logs or error messages
  2. Immediate Update: Update password storage systems immediately after change
  3. Old Password Cleanup: Securely delete old password records after successful change
  4. Communication: Use secure channels to communicate new passwords
  5. Access Logging: Log password change operations for security audit
  6. Testing: Always test new password before removing old password from storage

Workflow Example

Complete Password Rotation

// 1. Retrieve current password
let currentPassword = vault.get("pdf_current_password");

// 2. Generate new password
let newPassword = generateSecurePassword();

// 3. Store new password temporarily
vault.set("pdf_new_password", newPassword);

// 4. Use Change Password node
// ... node changes password ...

// 5. Update permanent storage
vault.set("pdf_current_password", newPassword);
vault.delete("pdf_new_password");

// 6. Notify stakeholders
sendNotification("Password updated for document XYZ");
  • Encrypt: Add initial password protection to PDFs
  • Decrypt: Remove all password protection
  • Vault: Securely store and retrieve passwords