{"record":{"id":"e4a5546a8f1ac77b","repo":"rustdesk/rustdesk","slug":"changing-permanent-password-is-disabled","errorCode":null,"errorMessage":"Changing permanent password is disabled","messagePattern":"Changing permanent password is disabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ipc.rs","lineNumber":1700,"sourceCode":"}\n\npub fn is_permanent_password_preset() -> bool {\n    if let Ok(Some(v)) = get_config(\"permanent-password-is-preset\") {\n        let v = v.trim();\n        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?;","sourceCodeStart":1682,"sourceCodeEnd":1718,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540/src/ipc.rs#L1682-L1718","documentation":"set_permanent_password first checks Config::is_disable_change_permanent_password(). When the deployment has disabled changing the permanent password (an admin/policy option), the call bails immediately with 'Changing permanent password is disabled' before any IPC to the daemon happens. This is a deliberate policy gate, not a transient failure.","triggerScenarios":"Calling set_permanent_password (CLI --password or IPC) on an installation where the 'disable changing permanent password' security option / managed policy is enabled.","commonSituations":"Managed/corporate RustDesk deployments where admins lock the password policy; a local config option flipped by a previous run or custom client build; kiosk setups where credentials are fixed centrally.","solutions":["Ask the administrator to disable the 'disable changing permanent password' policy if the change is legitimate.","Verify the setting with the security/options configuration and clear it locally if you control the machine.","Use an alternative credential mechanism not blocked by the policy (e.g. unlock PIN) where allowed.","If you build custom clients, enable the password-change option in the build configuration."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match set_permanent_password(pwd) {\n    Err(e) if e.to_string().contains(\"disabled\") => {\n        eprintln!(\"password change is locked by policy; contact your admin\");\n    }\n    other => other?,\n}","preventionTips":["Check the disable-change-permanent-password option before offering the change in UI/automation","Document policy locks in managed deployments","Ship pre-checks in provisioning scripts so they fail fast with a clear message"],"tags":["policy","password","permission","disabled-feature"],"backgroundTag":"feature-not-enabled","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"}