diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-04-03 20:55:45 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-04-03 20:55:45 -0300 |
commit | 33306dcffba98f87d5396249158540913caf836f (patch) | |
tree | e3063750de2b158a956e1dbf9df43781bb2c7a7a /kvmx-create | |
parent | 992768e488f5b80c53920c3b6b1c05cb3d359078 (diff) | |
download | kvmx-33306dcffba98f87d5396249158540913caf836f.tar.gz kvmx-33306dcffba98f87d5396249158540913caf836f.tar.bz2 |
Fix user handling at kvmx-create
Diffstat (limited to 'kvmx-create')
-rwxr-xr-x | kvmx-create | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kvmx-create b/kvmx-create index 33a7351..fdc3c7b 100755 --- a/kvmx-create +++ b/kvmx-create @@ -342,14 +342,14 @@ EOF pubkey="$DIRNAME/share/ssh/insecure_private_key.pub" fi - kvmx_sudo_run chroot $WORK/ mkdir -p /home/user/.ssh - kvmx_sudo_run chroot $WORK/ chmod 700 /home/user/.ssh - kvmx_sudo_run cp $pubkey $WORK/home/user/.ssh/authorized_keys - kvmx_sudo_run chroot $WORK/ chmod 600 /home/user/.ssh/authorized_keys - kvmx_sudo_run touch $WORK/home/user/.hushlogin + kvmx_sudo_run chroot $WORK/ mkdir -p /home/$user/.ssh + kvmx_sudo_run chroot $WORK/ chmod 700 /home/$user/.ssh + kvmx_sudo_run cp $pubkey $WORK/home/$user/.ssh/authorized_keys + kvmx_sudo_run chroot $WORK/ chmod 600 /home/$user/.ssh/authorized_keys + kvmx_sudo_run touch $WORK/home/$user/.hushlogin fi - kvmx_sudo_run chroot $WORK/ chown -R user.user /home/user + kvmx_sudo_run chroot $WORK/ chown -R $user.$user /home/$user echo "$user:$password" | kvmx_sudo_run chroot $WORK/ chpasswd } |