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,
|
"--rootsize=%s" % storage,
|
||||||
"--swapsize=%s" % swap,
|
"--swapsize=%s" % swap,
|
||||||
"--templates=/tmp/libvirt/%s/templates/libvirt" % vm_id,
|
"--templates=/tmp/libvirt/%s/templates/libvirt" % vm_id,
|
||||||
# "--user=ubuntu",
|
# USER
|
||||||
# "--name=administrator",
|
"--user=administrator",
|
||||||
# "--pass=%s" % password,
|
"--name=administrator",
|
||||||
# "--ssh-user-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
"--pass=%s" % password,
|
||||||
|
"--ssh-user-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
||||||
"--lock-user",
|
"--lock-user",
|
||||||
"--rootpass=%s" % password,
|
"--rootpass=%s" % password,
|
||||||
"--ssh-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
"--ssh-key=/tmp/libvirt/%s/authorized_keys" % vm_id,
|
||||||
"--addpkg=linux-image-generic",
|
"--addpkg=linux-image-generic",
|
||||||
"--addpkg=vim-nox",
|
"--addpkg=vim-nox",
|
||||||
"--addpkg=nano",
|
# "--addpkg=nano",
|
||||||
"--addpkg=unattended-upgrades",
|
"--addpkg=unattended-upgrades",
|
||||||
"--addpkg=acpid",
|
"--addpkg=acpid",
|
||||||
"--addpkg=fail2ban",
|
# "--addpkg=fail2ban",
|
||||||
"--firstboot=/tmp/libvirt/%s/boot.sh" % vm_id,
|
"--firstboot=/tmp/libvirt/%s/boot.sh" % vm_id,
|
||||||
"--mem=%s" % memory,
|
"--mem=%s" % memory,
|
||||||
"--cpus=%s" % cores,
|
"--cpus=%s" % cores,
|
||||||
|
@ -227,5 +228,4 @@ class QEMU:
|
||||||
print ';;;'
|
print ';;;'
|
||||||
print subprocess.call(' '.join(c), shell=True)
|
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
|
return True
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='SWSCloudNode',
|
name='SWSCloudNode',
|
||||||
version='3.1.3',
|
version='3.1.4',
|
||||||
author='Vyacheslav Anzhiganov',
|
author='Vyacheslav Anzhiganov',
|
||||||
author_email='vanzhiganov@ya.ru',
|
author_email='vanzhiganov@ya.ru',
|
||||||
packages=[
|
packages=[
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# passwd -e administrator
|
# passwd -e administrator
|
||||||
|
|
||||||
# Remove default `ubuntu` user
|
# Remove default `ubuntu` user
|
||||||
deluser --remove-home --remove-all-files ubuntu
|
# deluser --remove-home --remove-all-files ubuntu
|
||||||
|
|
||||||
# Install openssh-server
|
# Install openssh-server
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
Loading…
Add table
Reference in a new issue