a third attempt at setting the password

axtloss/rework-partitioning
amy 3 years ago
parent 1a0e4775e3
commit 7eba5709ba

@ -56,16 +56,10 @@ pub fn root_pass(root_pass: &str) {
"bash", "bash",
vec![ vec![
String::from("-c"), String::from("-c"),
String::from("'usermod"), format!(
String::from("--password"), "'usermod --password $(echo {} | openssl passwd -1 -stdin) root'",
String::from("$(echo"), root_pass
String::from(root_pass), ),
String::from("|"),
String::from("openssl"),
String::from("passwd"),
String::from("-1"),
String::from("-stdin)"),
String::from("root'"),
], ],
), ),
"set root password", "set root password",

@ -179,8 +179,6 @@ fn main() {
app.value_of("password").unwrap(), app.value_of("password").unwrap(),
); );
} else if let Some(app) = app.subcommand_matches("rootPass") { } else if let Some(app) = app.subcommand_matches("rootPass") {
let rootpass = app.value_of("rootPass").unwrap();
println!("{}", rootpass);
users::root_pass(app.value_of("rootPass").unwrap()); users::root_pass(app.value_of("rootPass").unwrap());
} }
} else if let Some(app) = app.subcommand_matches("desktops") { } else if let Some(app) = app.subcommand_matches("desktops") {

Loading…
Cancel
Save