31 lines
474 B
Plaintext
31 lines
474 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
PREREQ=""
|
||
|
DESCRIPTION="Adding live session user..."
|
||
|
|
||
|
. /scripts/casper-functions
|
||
|
|
||
|
prereqs()
|
||
|
{
|
||
|
echo "$PREREQ"
|
||
|
}
|
||
|
|
||
|
case $1 in
|
||
|
# get pre-requisites
|
||
|
prereqs)
|
||
|
prereqs
|
||
|
exit 0
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
log_begin_msg "$DESCRIPTION"
|
||
|
|
||
|
# U6aMy0wojraho is just a blank password
|
||
|
chroot /root useradd -c "$USERFULLNAME" -m $USERNAME -p U6aMy0wojraho
|
||
|
|
||
|
if [ -f /root/etc/sudoers ]; then
|
||
|
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers
|
||
|
fi
|
||
|
|
||
|
log_end_msg
|