Fix method of adding scheme
This commit is contained in:
+3
-3
@@ -183,8 +183,8 @@ pub fn install(config: Config, cookbook: Option<&str>) -> Result<(), String> {
|
||||
let gid = user.gid.unwrap_or(uid);
|
||||
|
||||
let name = prompt!(user.name, username.clone(), "{}: name [{}]: ", username, username)?;
|
||||
let home = prompt!(user.home, format!("file:/home/{}", username), "{}: home [file:/home/{}]: ", username, username)?;
|
||||
let shell = prompt!(user.shell, "file:/bin/ion".to_string(), "{}: shell [file:/bin/ion]: ", username)?;
|
||||
let home = prompt!(user.home, format!("/home/{}", username), "{}: home [/home/{}]: ", username, username)?;
|
||||
let shell = prompt!(user.shell, "/bin/ion".to_string(), "{}: shell [/bin/ion]: ", username)?;
|
||||
|
||||
println!("Adding user {}:", username);
|
||||
println!("\tPassword: {}", password);
|
||||
@@ -196,7 +196,7 @@ pub fn install(config: Config, cookbook: Option<&str>) -> Result<(), String> {
|
||||
|
||||
dir!(home.trim_matches('/'));
|
||||
|
||||
passwd.push_str(&format!("{};{};{};{};{};{};{}\n", username, password, uid, gid, name, home, shell));
|
||||
passwd.push_str(&format!("{};{};{};{};{};file:{};file:{}\n", username, password, uid, gid, name, home, shell));
|
||||
}
|
||||
if ! passwd.is_empty() {
|
||||
file!("etc/passwd", passwd.as_bytes(), false);
|
||||
|
||||
Reference in New Issue
Block a user