mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
add root password setting
This commit is contained in:
parent
6c81ee2f8c
commit
5e6ac546cd
3 changed files with 11 additions and 2 deletions
|
@ -48,7 +48,9 @@ def tasks(tasklist, manifest):
|
||||||
boot.BlackListModules(),
|
boot.BlackListModules(),
|
||||||
boot.DisableGetTTYs(),
|
boot.DisableGetTTYs(),
|
||||||
security.EnableShadowConfig(),
|
security.EnableShadowConfig(),
|
||||||
security.DisableSSHPasswordAuthentication(),
|
security.SetRootPassword(),
|
||||||
|
# Disable for the time of debugging
|
||||||
|
#security.DisableSSHPasswordAuthentication(),
|
||||||
security.DisableSSHDNSLookup(),
|
security.DisableSSHDNSLookup(),
|
||||||
network.RemoveDNSInfo(),
|
network.RemoveDNSInfo(),
|
||||||
network.ConfigureNetworkIF(),
|
network.ConfigureNetworkIF(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
"title": "EC2 manifest",
|
"title": "OpenNebula manifest",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"volume": {
|
"volume": {
|
||||||
|
|
|
@ -11,6 +11,13 @@ class EnableShadowConfig(Task):
|
||||||
from common.tools import log_check_call
|
from common.tools import log_check_call
|
||||||
log_check_call(['/usr/sbin/chroot', info.root, '/sbin/shadowconfig', 'on'])
|
log_check_call(['/usr/sbin/chroot', info.root, '/sbin/shadowconfig', 'on'])
|
||||||
|
|
||||||
|
class SetRootPassword(Task):
|
||||||
|
description = 'Set password for root'
|
||||||
|
phase = phases.system_modification
|
||||||
|
|
||||||
|
def run(self, info):
|
||||||
|
from common.tools import log_check_call
|
||||||
|
log_check_call(['/usr/sbin/chpasswd'], 'root:'+info.manifest.credentials['root'])
|
||||||
|
|
||||||
class DisableSSHPasswordAuthentication(Task):
|
class DisableSSHPasswordAuthentication(Task):
|
||||||
description = 'Disabling SSH password authentication'
|
description = 'Disabling SSH password authentication'
|
||||||
|
|
Loading…
Add table
Reference in a new issue