(self, username, home=None, password=None, shell=None)
Adds the passed user to the container system.
Adds the passed user to the container system.
Adds the passed user to the container system .
def create_user(self, username, home=None, password=None, shell=None):
        """ Adds the passed user to the container system. """
        options = ['--create-home', ]
        if home is not None:
            options += ['--home-dir', home, ]
        if password is not None:
            options += ['-p', password, ]
        if shell is not None:
            options += ['-s', shell, ]
        self.run(['useradd', ] + options + [username, ])
def create_user ( self , username , home = None , password = None , shell = None ) : options = [ '--create-home' , ] if home is not None : options += [ '--home-dir' , home , ] if password is not None : options += [ '-p' , password , ] if shell is not None : options += [ '-s' , shell , ] self . run ( [ 'useradd' , ] + options + [ username , ] )