From 9fe585f2e1d29a5867dfa7228ac9be22dd1e732f Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Mon, 22 Mar 2021 20:10:33 +0900 Subject: [PATCH] Add user --- os-brainux/setup_brainux.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/os-brainux/setup_brainux.sh b/os-brainux/setup_brainux.sh index 6521d83..207aa06 100755 --- a/os-brainux/setup_brainux.sh +++ b/os-brainux/setup_brainux.sh @@ -44,14 +44,6 @@ echo "$TIMEZONE" > /etc/timezone && \ update-locale LANG=en_US.UTF-8 echo "brain" > /etc/hostname - - -echo root:root | chpasswd - -cat <> /etc/securetty -ttymxc0 -EOF - DEBIAN_FRONTEND=noninteractive \ apt install -y dialog sudo \ libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \ @@ -68,6 +60,19 @@ DEBIAN_FRONTEND=noninteractive \ # Fix Midori launch failure sudo update-mime-database /usr/share/mime +# Setup users +adduser --gecos "" --disabled-password --home /home/user user +echo user:brain | chpasswd +echo "user ALL=(ALL:ALL) ALL" > /etc/sudoers.d/user +echo -e "127.0.1.1\tbrain" >> /etc/hosts + +echo root:root | chpasswd + +# Allow root login via UART +cat <> /etc/securetty +ttymxc0 +EOF + # Get wild cat < /etc/apt/sources.list deb http://deb.debian.org/debian buster main contrib non-free