Use adduser instead of useradd/usermod.
It's a matter of habit more than an absolute technical requirement. Quoting the useradd manpage: useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
This commit is contained in:
parent
b9bf65b4a1
commit
5e5836d378
@ -8,8 +8,9 @@ toast_me() {
|
|||||||
chroot $MNT apt-get install -y wget sudo avahi-daemon
|
chroot $MNT apt-get install -y wget sudo avahi-daemon
|
||||||
chroot $MNT apt-get clean
|
chroot $MNT apt-get clean
|
||||||
# Ensure we have the pi user
|
# Ensure we have the pi user
|
||||||
chroot $MNT useradd -s /bin/bash -Gsudo -m pi
|
chroot $MNT adduser --disabled-password --gecos '' pi
|
||||||
chroot $MNT usermod -aG plugdev pi
|
chroot $MNT adduser pi sudo
|
||||||
|
chroot $MNT adduser pi plugdev
|
||||||
echo "pi:raspberry" | chroot $MNT chpasswd
|
echo "pi:raspberry" | chroot $MNT chpasswd
|
||||||
# Force generate SSH host keys if they exist and enable SSH
|
# Force generate SSH host keys if they exist and enable SSH
|
||||||
rm -f $MNT/etc/ssh/ssh_host_*
|
rm -f $MNT/etc/ssh/ssh_host_*
|
||||||
|
Loading…
Reference in New Issue
Block a user