Looking at lines 74-75, won't the root password be writen twice?
(Not that it should break anything....)