diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2018-07-19 16:31:57 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2018-07-19 16:31:57 -0300 | 
| commit | 80d7e582740fc7e3ef4d0ce826a1aa237c00177d (patch) | |
| tree | b0d05eb3e21ef4a554c89863041a216c1550261c | |
| parent | d96da0f9587273ae5e2065406191dc4bb28ff384 (diff) | |
| download | kvmx-80d7e582740fc7e3ef4d0ce826a1aa237c00177d.tar.gz kvmx-80d7e582740fc7e3ef4d0ce826a1aa237c00177d.tar.bz2  | |
Ensure random root password at kvmx-create
| -rwxr-xr-x | kvmx-create | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/kvmx-create b/kvmx-create index 43e5a82..70812ff 100755 --- a/kvmx-create +++ b/kvmx-create @@ -460,8 +460,9 @@ EOF    $APT_INSTALL sudo -y    echo "%sudo ALL=NOPASSWD: ALL" | $SUDO tee $WORK/etc/sudoers.d/local > /dev/null -  # Root password -  echo 'root:root' | kvmx_sudo_run chroot $WORK/ chpasswd +  # Scrambled root password +  #echo 'root:root'                               | kvmx_sudo_run chroot $WORK/ chpasswd +  echo "root:$(head -c 40 /dev/urandom | base64)" | kvmx_sudo_run chroot $WORK/ chpasswd    # Initial user    if ! grep -q "^$user:" $WORK/etc/passwd; then  | 
