Closed bpow closed 8 years ago
As currently written, arch-bootstrap overwrites the /etc/shadow from the filesystem
pkg. This results in the absence of many user entries (including dbus-- I figured this out after running into the same problem described here ). This makes it so that when filesystem
is force-reinstalled later on in the script, the /etc/shadow
(and /etc/passwd
that it tries to install instead go to .pacnew
files.
Good idea. Maybe ^root:.*
?
I suggest ^root.+\n
Updated to use a more explicit regex for the search (^root:.*$
). This makes a lot of sense, avoiding replacing lines for usernames like root66
(yeah, a weird username, but that's how some people get their kicks, I guess).
The '$' may be overkill, but shouldn't hurt things.
Using '+' would require sed -r
for extended regex, and I don't know how portable that is to other sed versions.
The other alternative would have been to use gawk (already a script requirement). I don't feel strongly about how to accomplish this.
Hopefully people change the root password soon after installing, anyway...
The '$' may be overkill, but shouldn't hurt things.
I originally used that to mean end of line, but reading the sed man page makes me think it could be end of file/stream. Either way I that wasn't my goal so I dropped the $
.
Using '+' would require sed -r for extended regex, and I don't know how portable that is to other sed versions.
Oh, I didn't know that, that's good to know. Thanks!
My current vote is just to use @tokland's suggestion then.
Merged, thx!
Edit, rather than overwrite the
/etc/shadow
unpacked from thefilesystem
package. Otherwise many several users expected in the installed system (e.g. dbus) will not be present in the installed system.