diff --git a/src/create_iso.rs b/src/create_iso.rs index 5708ecf..296e393 100644 --- a/src/create_iso.rs +++ b/src/create_iso.rs @@ -56,12 +56,7 @@ pub fn create_iso( if let Some((user, pass, uid)) = user { print_status(&format!("Setting user {user}")); - let hashed_pw = run_command( - &["openssl", "passwd", "-6"], - Some(&format!("{pass}\n{pass}\n")), - false, - ) - .0; + let hashed_pw = run_command(&["openssl", "passwd", "-6", pass.as_str()], None, false).0; std::fs::write( "./iso/airootfs/etc/doas.conf", format!("permit persist {user} as root\n"), @@ -71,7 +66,7 @@ pub fn create_iso( std::fs::write("./iso/airootfs/etc/passwd", format!("root:x:0:0:root:/root:/usr/bin/zsh\n{user}:x:{uid}:{uid}::/home/{user}:/usr/bin/zsh\n")).unwrap(); std::fs::write( "./iso/airootfs/etc/shadow", - format!("root::14871::::::\n{user}:{hashed_pw}"), + format!("root::14871::::::\n{user}:{hashed_pw}:14871::::::"), ) .unwrap(); std::fs::write(