Informix Error -26706: Cannot add a password to the user (%s) because a password already exists. Use the MODIFY option instead of the ADD option.
Cause and resolution
Cannot add a password to the user (%s) because a password already exists. Use the MODIFY option instead of the ADD option.
An ALTER USER operation can only add a password for a user if that user does not have a password. If you want to change the password, use the MODIFY option in the ALTER statement. If you want to drop the password, use the DROP option in the ALTER statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26706 fires when ALTER USER ... ADD PASSWORD targets a user that already has a
password — per the official guidance.
- The user already has a password, and
ADDwas used instead ofMODIFY, per the official guidance — the direct, only cause;ADDonly works when no password exists.
Solutions / Resolution
- Use
MODIFYinstead ofADDto change an existing password, per the official guidance, or - Use
DROPto remove the password, per the official guidance.
Examples
Adding a password that already exists
ALTER USER alice ADD PASSWORD '...';
-- -26706: alice already has a password
Corrected
ALTER USER alice MODIFY PASSWORD '...';
Diagnostic Checks
- Check whether the user already has a password, and use
MODIFY/DROPinstead ofADDaccordingly.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -26706 in this set yet.
ALTER USER ... ADD PASSWORD targeted a user who already has one — use MODIFY instead.