File indexing completed on 2024-06-16 13:59:15

0001 #!/bin/sh -x
0002 
0003 USER=respeaker
0004 GECOS=respeaker
0005 UGID=32011
0006 PASSWORD=mycroft
0007 
0008 DEFGROUPS="tty,sudo,adm,dialout,cdrom,plugdev,audio,dip,video"
0009 
0010 echo "I: creating default user $USER"
0011 adduser --gecos $GECOS --disabled-login $USER --uid $UGID
0012 
0013 echo "I: set user $USER password to $PASSWORD"
0014 echo "$USER:$PASSWORD" | /usr/sbin/chpasswd
0015 
0016 mkdir -p /home/$USER/Music
0017 mkdir -p /home/$USER/Pictures
0018 mkdir -p /home/$USER/Videos
0019 mkdir -p /home/$USER/Downloads
0020 mkdir -p /home/$USER/Documents
0021 chown -R $UGID:$UGID /home/$USER
0022 
0023 usermod -a -G ${DEFGROUPS} ${USER}