with open(os.path.join(containerDir, 'etc/hostname'), 'w') as f:
print >>f, name.replace('_', '-')
+ # Add slices group if not already present
+ command = ['/usr/sbin/groupadd slices']
+ logger.log_call(command, timeout=15*60)
+
# Add unix account
- command = ['/usr/sbin/useradd', '-s', '/bin/sh', name]
+ command = ['/usr/sbin/useradd', '-g', 'slices', '-s', '/bin/sh', name, '-p', '*']
logger.log_call(command, timeout=15*60)
# Get a connection and lookup for the sliver before actually
conn = Sliver_LV.getConnection()
try:
- command = ['/usr/sbin/userdel', name]
+ command = ['/usr/sbin/userdel', '-r', name]
logger.log_call(command, timeout=15*60)
# Destroy libvirt domain