This commit is contained in:
simono41 2018-03-18 18:24:31 +01:00
parent 09f1c55004
commit 6eca29c739
2 changed files with 9 additions and 9 deletions

View file

@ -9,7 +9,7 @@ if [[ $EUID -ne 0 ]]; then
fi fi
echo "Als root Angemeldet" echo "Als root Angemeldet"
# #
function adduser() { function addusers() {
useradd -m -g users -G wheel,audio,video,sys,optical -s /bin/bash $username useradd -m -g users -G wheel,audio,video,sys,optical -s /bin/bash $username
passwd ${username} <<EOT passwd ${username} <<EOT
${userpass} ${userpass}
@ -59,7 +59,7 @@ function userrechte() {
username="$1" username="$1"
userpass="$2" userpass="$2"
adduser addusers
copyconfig copyconfig
echo "Fertig!!!" echo "Fertig!!!"

View file

@ -126,7 +126,7 @@ function checkend() {
} }
function adduser() { function addusers() {
useradd -m -g users -G wheel,audio,video,sys,optical -s /bin/bash $username useradd -m -g users -G wheel,audio,video,sys,optical -s /bin/bash $username
passwd ${username} <<EOT passwd ${username} <<EOT
${userpass} ${userpass}
@ -257,14 +257,14 @@ if [ "$1" == "adduser" ]
then then
username=$2 username=$2
userpass=$3 userpass=$3
adduser addusers
exit 0 exit 0
fi fi
if cat /etc/passwd | grep ${username} > /dev/null; then if cat /etc/passwd | grep ${username} > /dev/null; then
echo "${username} existiert bereits!!!" echo "${username} existiert bereits!!!"
else else
adduser addusers
fi fi
if [ "$erstellen" == "exit" ] if [ "$erstellen" == "exit" ]
@ -641,9 +641,9 @@ if [ "${vollinstallation}" != "n" ]; then
mkdir -p /root/Musik mkdir -p /root/Musik
mkdir -p /root/Videos mkdir -p /root/Videos
# adduser.sh # addusers.sh
cp /opt/${repo}/adduser.sh /usr/bin/adduser cp /opt/${repo}/addusers.sh /usr/bin/addusers
chmod 755 /usr/bin/adduser chmod 755 /usr/bin/addusers
# shell-fish # shell-fish
chsh -s /usr/bin/fish root chsh -s /usr/bin/fish root