'Desired hostname for the installation: ').strip(' ') # Ask for a root password (optional, but triggers requirement for super-user if skipped) if not archinstall.arguments.get('!root-password', None): archinstall.arguments['!root-password'] = archinstall.get_password( prompt= 'Enter root password (Recommendation: leave blank to leave root disabled): ' ) # Ask for additional users (super-user if root pw was not set) archinstall.arguments['users'] = {} archinstall.arguments['superusers'] = {} if not archinstall.arguments.get('!root-password', None): archinstall.arguments[ 'superusers'] = archinstall.ask_for_superuser_account( 'Create a required super-user with sudo privileges: ', forced=True) users, superusers = archinstall.ask_for_additional_users( 'Enter a username to create a additional user (leave blank to skip & continue): ' ) archinstall.arguments['users'] = users archinstall.arguments['superusers'] = { **archinstall.arguments['superusers'], **superusers } # Ask for archinstall-specific profiles (such as desktop environments etc) if not archinstall.arguments.get('profile', None): archinstall.arguments['profile'] = archinstall.select_profile( archinstall.list_profiles())
def _create_superuser_account(self): superuser = archinstall.ask_for_superuser_account( 'Create a required super-user with sudo privileges: ', forced=True) return superuser