{"record":{"id":"61d2417fddf3455a","repo":"rustdesk/rustdesk","slug":"changing-permanent-password-was-rejected-by-daemon","errorCode":null,"errorMessage":"Changing permanent password was rejected by daemon","messagePattern":"Changing permanent password was rejected by daemon","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ipc.rs","lineNumber":1705,"sourceCode":"        return v == \"Y\";\n    }\n    false\n}\n\npub fn get_fingerprint() -> String {\n    get_config(\"fingerprint\")\n        .unwrap_or_default()\n        .unwrap_or_default()\n}\n\npub fn set_permanent_password(v: String) -> ResultType<()> {\n    if Config::is_disable_change_permanent_password() {\n        bail!(\"Changing permanent password is disabled\");\n    }\n    if set_permanent_password_with_ack(v)? {\n        Ok(())\n    } else {\n        bail!(\"Changing permanent password was rejected by daemon\");\n    }\n}\n\n#[tokio::main(flavor = \"current_thread\")]\npub async fn set_permanent_password_with_ack(v: String) -> ResultType<bool> {\n    set_permanent_password_with_ack_async(v).await\n}\n\nasync fn set_permanent_password_with_ack_async(v: String) -> ResultType<bool> {\n    // The daemon ACK/NACK is expected quickly since it applies the config in-process.\n    let ms_timeout = 1_000;\n    let mut c = connect(ms_timeout, \"\").await?;\n    c.send_config(\"permanent-password\", v).await?;\n    if let Some(Data::Config((name2, Some(v)))) = c.next_timeout(ms_timeout).await? {\n        if name2 == \"permanent-password\" {\n            let v = v.trim();\n            let ok = v == \"Y\";\n            if ok {","sourceCodeStart":1687,"sourceCodeEnd":1723,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540/src/ipc.rs#L1687-L1723","documentation":"set_permanent_password forwards the change to the daemon via set_permanent_password_with_ack and expects an affirmative acknowledgement. If the daemon processes the request but does not confirm success (the ack returns false), the client bails with 'Changing permanent password was rejected by daemon'. The daemon itself may have refused because its own policy check failed or its local set operation errored.","triggerScenarios":"Calling set_permanent_password when the daemon receives the request but its response/ack indicates the change was not applied — daemon-side disable flag still active, daemon failed to persist the new password, IPC reply missing the expected success flag, or the daemon is an older/incompatible version.","commonSituations":"Client and daemon version mismatch where the ack semantics differ; daemon running with the password-change policy disabled while the client check passed; daemon config directory not writable so persistence failed; transient IPC desynchronization.","solutions":["Restart the RustDesk daemon/service so it picks up current config, then retry the password change.","Ensure client and daemon are the same version (upgrade both) so the ack protocol matches.","Check daemon-side settings: the same disable-change-permanent-password policy must be off there too.","Verify the daemon can write its config directory (permissions/disk space) so the new password can be persisted."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match set_permanent_password(pwd) {\n    Err(e) if e.to_string().contains(\"rejected by daemon\") => {\n        // restart/verify daemon, then retry once\n        restart_daemon();\n        set_permanent_password(pwd)?;\n    }\n    other => other?,\n}","preventionTips":["Keep client and daemon versions in lockstep","Ensure the daemon's config directory is writable before credential operations","Confirm the daemon-side policy also allows password changes","Verify daemon health (service running, IPC reachable) before invoking password ops"],"tags":["ipc","daemon","password","ack-rejected"],"backgroundTag":"api-error-response","analyzedSha":"91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540","analyzedAt":"2026-09-10T19:53:44.083Z","contentChangedAt":"2026-09-10T19:53:44.083Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}