From bf32476bfd92af8280c17bc04fe73a3932e01b7d Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Fri, 29 Nov 2019 17:56:27 +0100 Subject: Fixing password order for commnaads --- archinstall.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'archinstall.py') diff --git a/archinstall.py b/archinstall.py index 5635561e..2f22f94c 100644 --- a/archinstall.py +++ b/archinstall.py @@ -1356,6 +1356,14 @@ if __name__ == '__main__': add_AUR_support() print('[N] AUR support added. use "yay -Syy --noconfirm " to deploy in POST.') + ## == Passwords + # o = sys_command('arch-chroot /mnt usermod --password {} root'.format(args['password'])) + # o = sys_command("arch-chroot /mnt sh -c 'echo {pin} | passwd --stdin root'".format(pin='"{pin}"'.format(**args, pin=args['password'])), echo=True) + o = simple_command("/usr/bin/arch-chroot /mnt sh -c \"echo 'root:{pin}' | chpasswd\"".format(**args, pin=args['password'])) + if 'user' in args: + o = ('/usr/bin/arch-chroot /mnt useradd -m -G wheel {user}'.format(**args)) + o = ("/usr/bin/arch-chroot /mnt sh -c \"echo '{user}:{pin}' | chpasswd\"".format(**args, pin=args['password'])) + print('[N] Running post installation steps.') run_post_install_steps() time.sleep(2) @@ -1368,14 +1376,6 @@ if __name__ == '__main__': if args['phone-home']: phone_home(args['phone-home']) - ## == Passwords - # o = sys_command('arch-chroot /mnt usermod --password {} root'.format(args['password'])) - # o = sys_command("arch-chroot /mnt sh -c 'echo {pin} | passwd --stdin root'".format(pin='"{pin}"'.format(**args, pin=args['password'])), echo=True) - o = simple_command("/usr/bin/arch-chroot /mnt sh -c \"echo 'root:{pin}' | chpasswd\"".format(**args, pin=args['password'])) - if 'user' in args: - o = ('/usr/bin/arch-chroot /mnt useradd -m -G wheel {user}'.format(**args)) - o = ("/usr/bin/arch-chroot /mnt sh -c \"echo '{user}:{pin}' | chpasswd\"".format(**args, pin=args['password'])) - if args['post'] == 'reboot': o = simple_command('/usr/bin/umount -R /mnt') o = simple_command('/usr/bin/reboot now') -- cgit v1.2.3-70-g09d2