Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 01:08:30 +0200
committerLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 01:08:30 +0200
commit1cc417628d76b329dd9c26f1a95d875e2b9653ad (patch)
treedcf4e3ad8d694188b35f221091640b394b1e0e36 /archinstall.py
parent033ffca757a890a86bf33a6434db122671df732f (diff)
usermod isn't able to change the password for some reason. fallback solution
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/archinstall.py b/archinstall.py
index 91a24fe8..43e1ba32 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -186,11 +186,11 @@ if __name__ == '__main__':
o = run("arch-chroot /mnt sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen")
o = run('arch-chroot /mnt locale-gen')
o = run('arch-chroot /mnt chmod 700 /root')
- o = run('arch-chroot /mnt usermod --password {} root'.format(PIN))
- print(o)
+ #o = run('arch-chroot /mnt usermod --password {} root'.format(PIN))
+ o = run("arch-chroot /mnt echo 'root:{pin}' | chpasswd".format(**args, pin=PIN))
if 'user' in args:
o = run('arch-chroot /mnt useradd -m -G wheel {user}'.format(**args))
- o = run('arch-chroot /mnt usermod --password {pin} {user}'.format(**args, pin=PIN))
+ o = run("arch-chroot /mnt echo '{user}:{pin}' | chpasswd".format(**args, pin=PIN))
with open('/mnt/etc/mkinitcpio.conf', 'w') as mkinit:
## TODO: Don't replace it, in case some update in the future actually adds something.