added sudoer user administrator
This commit is contained in:
parent
1f3d15794d
commit
9867c7857c
3 changed files with 9 additions and 9 deletions
|
@ -201,19 +201,20 @@ class QEMU:
|
|||
"--rootsize=%s" % storage,
|
||||
"--swapsize=%s" % swap,
|
||||
"--templates=/tmp/libvirt/%s/templates/libvirt" % vm_id,
|
||||
# "--user=ubuntu",
|
||||
# "--name=administrator",
|
||||
# "--pass=%s" % password,
|
||||
# "--ssh-user-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
||||
# USER
|
||||
"--user=administrator",
|
||||
"--name=administrator",
|
||||
"--pass=%s" % password,
|
||||
"--ssh-user-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
||||
"--lock-user",
|
||||
"--rootpass=%s" % password,
|
||||
"--ssh-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
||||
"--addpkg=linux-image-generic",
|
||||
"--addpkg=vim-nox",
|
||||
"--addpkg=nano",
|
||||
# "--addpkg=nano",
|
||||
"--addpkg=unattended-upgrades",
|
||||
"--addpkg=acpid",
|
||||
"--addpkg=fail2ban",
|
||||
# "--addpkg=fail2ban",
|
||||
"--firstboot=/tmp/libvirt/%s/boot.sh" % vm_id,
|
||||
"--mem=%s" % memory,
|
||||
"--cpus=%s" % cores,
|
||||
|
@ -227,5 +228,4 @@ class QEMU:
|
|||
print ';;;'
|
||||
print subprocess.call(' '.join(c), shell=True)
|
||||
|
||||
# os.popen("cd /var/lib/qemu/images/%(hostname)s;/usr/bin/vmbuilder kvm %(os_name)s --suite=%(os_suite)s --flavour=virtual --arch=amd64 --mirror=%(mirror)s -o --qemu=qemu:///system --ip=%(ip)s --gw=%(gw)s --part=/var/lib/qemu/images/%(hostname)s/partition --templates=templates --user=administrator --name=administrator --pass=%(password)s --addpkg=linux-image-generic --addpkg=vim-nox --addpkg=nano --addpkg=unattended-upgrades --addpkg=acpid --firstboot=/var/lib/qemu/images/%(hostname)s/boot.sh --mem=%(memory)s --cpus=%(cores)s --hostname=%(hostname)s --bridge=br0" % values)
|
||||
return True
|
||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name='SWSCloudNode',
|
||||
version='3.1.3',
|
||||
version='3.1.4',
|
||||
author='Vyacheslav Anzhiganov',
|
||||
author_email='vanzhiganov@ya.ru',
|
||||
packages=[
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# passwd -e administrator
|
||||
|
||||
# Remove default `ubuntu` user
|
||||
deluser --remove-home --remove-all-files ubuntu
|
||||
# deluser --remove-home --remove-all-files ubuntu
|
||||
|
||||
# Install openssh-server
|
||||
apt-get update
|
||||
|
|
Loading…
Add table
Reference in a new issue