4
0

fixed SystemSetRootPassword

This commit is contained in:
Benjamin Böhmke 2019-12-15 16:29:06 +01:00
parent d35d9afa3e
commit 1367005eee

View File

@ -27,7 +27,7 @@ func SystemSetRootPassword(password string) error {
if err != nil {
return fmt.Errorf("failed to generate hash: %w", err)
}
line := fmt.Sprintf("root:%s:0:0:::::", hash)
line := fmt.Sprintf("root:%s:0:0:::::\n", hash)
// write shadow file
return ioutil.WriteFile(systemShadow, []byte(line), os.ModePerm)