Change the default libvirt remote user to libvirt-remote

It is possible to communicate per ssh via a socket with libvirt. It is
not a good idea to do this as root, so the remote user is now
libvirt-remote. Only this user or users in the group libvirt-remote can
communicate with the socket.
The user libvirt-remote is created without a password. The users have to
set a password for this user after installation.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Jonatan Schlag
2016-06-10 10:57:13 +02:00
committed by Michael Tremer
parent 6c2720cac6
commit 77d989a667
3 changed files with 51 additions and 1 deletions

View File

@@ -22,6 +22,12 @@
############################################################################
#
. /opt/pakfire/lib/functions.sh
# creates a new user and group called libvirt-remote if they not exist
getent group libvirt-remote >/dev/null || groupadd libvirt-remote
getent passwd libvirt-remote >/dev/null || \
useradd -m -g libvirt-remote -s /bin/bash "libvirt-remote"
extract_files
start_service --delay 300 --background ${NAME}
ln -svf /etc/init.d/libvirtd /etc/rc.d/rc0.d/K20libvirtd