echo"=== Changing password via shadow-rs passwd ==="
# This requires PAM feature — skip if not compiled with PAM
if ./target/release/passwd --help 2>&1| grep -q "stdin";then
echo"newpassword
newpassword"| ./target/release/passwd -s testuser 2>&1&&echo"PASS: password changed"||echo"SKIP: PAM not functional (expected in CI without full PAM config)"
else
echo"SKIP: passwd not compiled with stdin support"