You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-touch/hooks/01-setup_user.chroot

24 lines
715 B

#!/bin/sh -x
USER=phablet
UGID=32011
echo "I: creating default user $USER"
adduser --gecos $USER --disabled-login $USER --uid $UGID
echo "I: set user $USER password to $USER"
echo "$USER:$USER" | chpasswd
adduser --gecos system --no-create-home --disabled-login --disabled-password system --uid 1000
adduser --gecos radio --no-create-home --disabled-login --disabled-password radio --uid 1001
# Prevent the system user from being presented in the greeter by bumping MIN_UID
sed -i 's/^\(UID_MIN\s\+\).*/\11001/g' /etc/login.defs
mkdir -p /home/$USER/Music
mkdir -p /home/$USER/Pictures
mkdir -p /home/$USER/Videos
mkdir -p /home/$USER/Downloads
mkdir -p /home/$USER/Documents
chown -R $UGID:$UGID /home/$USER