setting password works now

axtloss/rework-partitioning
amy 3 years ago
parent 699ef6eb86
commit c123560b07

@ -33,16 +33,10 @@ pub fn new_user(username: &str, hasroot: bool, password: &str) {
"bash",
vec![
String::from("-c"),
String::from("'usermod"),
String::from("--password"),
String::from("$(echo"),
String::from(password),
String::from("|"),
String::from("openssl"),
String::from("passwd"),
String::from("-1"),
String::from("-stdin)"),
format!("{}'", username),
format!(
r#"'usermod --password $(echo {} | openssl passwd -1 -stdin) {}'"#,
password, username
),
],
),
format!("Set password for user {}", username).as_str(),

Loading…
Cancel
Save