kadischi/post_install_scripts 07accounts.sh,NONE,1.1
Jasper O'neal Hartline (autopsy)
fedora-extras-commits at redhat.com
Tue Apr 18 00:21:35 UTC 2006
Author: autopsy
Update of /cvs/devel/kadischi/post_install_scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7357/kadischi/post_install_scripts
Added Files:
07accounts.sh
Log Message:
Few minor changes. Additional user account creation post_install_script.
--- NEW FILE 07accounts.sh ---
#!/bin/bash
#
# Allow creation of addition user accounts.
# UIDs start at 500, GID is 100.
. /etc/kadischi/kadischi.conf
SYSDIR=$1
ANACONDA_ARGS=$2
USING_KICKSTART=$(echo $ANACONDA_ARGS | grep -G [--]kickstart)
USING_CMDLINE=$(echo $ANACONDA_ARGS | egrep -- "-C|--cmdline")
i=0
if [ $USING_KICKSTART ] || [ $USING_CMDLINE ]; then
exit 0
else
echo "A non-root user should be created, create one now?"
echo -n "[yes/no] "
read CHOICE
if [ $CHOICE == "y" ] || [ $CHOICE == "yes" ]; then
while [ $CHOICE == "y" ] || [ $CHOICE == "yes" ]; do
echo -n "Username: "
read NEWUSERNAME
echo -n "User shell: "
read NEWSHELL
if [ -n $NEWUSERNAME ] && [ -n $NEWSHELL ]; then
chroot $SYSDIR /usr/sbin/useradd -d /home/$NEWUSERNAME -m -s $NEWSHELL -u 50$i -g 100 $NEWUSERNAME
chroot $SYSDIR /usr/bin/passwd $NEWUSERNAME
echo "User: $NEWUSERNAME, UID: 50$i, GID: 100 created successfully."
(( i += 1 ))
else
echo "Username or shell wasn't specified."
fi
echo "Would you like to create another user?"
echo -n "[yes/no] "
read CHOICE
done
else
exit 0
fi
fi
More information about the scm-commits
mailing list