{"record":{"id":"9f12d40343ecd645","repo":"zeroclaw-labs/zeroclaw","slug":"user-zeroclaw-exists-but-has-unexpected-shell","errorCode":null,"errorMessage":"User 'zeroclaw' exists but has unexpected shell '{}'.\nExpected nologin/false for security. Fix with: sudo {} && sudo {}","messagePattern":"User 'zeroclaw' exists but has unexpected shell '(.+?)'\\.\nExpected nologin/false for security\\. Fix with: sudo (.+?) && sudo (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/service/mod.rs","lineNumber":1450,"sourceCode":"            let parts: Vec<&str> = passwd_entry.split(':').collect();\n            if parts.len() >= 7 {\n                let uid = parts[2];\n                let gid = parts[3];\n                let home = parts[5];\n                let shell = parts[6];\n\n                if uid.parse::<u32>().unwrap_or(999) >= 1000 {\n                    bail!(\n                        \"User 'zeroclaw' exists but has unexpected UID {} (expected system UID < 1000).\\n\\\n                         Recreate with: sudo {} && sudo {}\",\n                        uid,\n                        del_cmd,\n                        add_cmd\n                    );\n                }\n\n                if !shell.contains(\"nologin\") && !shell.contains(\"false\") {\n                    bail!(\n                        \"User 'zeroclaw' exists but has unexpected shell '{}'.\\n\\\n                         Expected nologin/false for security. Fix with: sudo {} && sudo {}\",\n                        shell,\n                        del_cmd,\n                        add_cmd\n                    );\n                }\n\n                if home != \"/var/lib/zeroclaw\" && home != \"/nonexistent\" {\n                    eprintln!(\n                        \"⚠️  Warning: zeroclaw user has home directory '{}' (expected /var/lib/zeroclaw or /nonexistent)\",\n                        home\n                    );\n                }\n\n                let _ = gid;\n            }\n            Ok(())","sourceCodeStart":1432,"sourceCodeEnd":1468,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/service/mod.rs#L1432-L1468","documentation":"Error \"User 'zeroclaw' exists but has unexpected shell '{}'.\nExpected nologin/false for security. Fix with: sudo {} && sudo {}\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/service/mod.rs:1450 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the zeroclaw user's shell to nologin/false with the printed sudo commands."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}