Symlink gemini folder and add user to groupid
This commit is contained in:
parent
005cce4acf
commit
27bfbdd433
9
mkuser
9
mkuser
@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# This tool generates the users and/or appends the given SSH kjey to the authorized file
|
# echo $@ >> /etc/ttyserver/mkuser.log
|
||||||
|
# exit 0
|
||||||
|
|
||||||
|
#whoami >> /etc/ttyserver/mkuser.log
|
||||||
|
#exit 0
|
||||||
|
|
||||||
# $1 = username
|
# $1 = username
|
||||||
# $2 = tempfile
|
# $2 = tempfile
|
||||||
@ -23,7 +27,8 @@ if [[ "$1" =~ ^[a-zA-Z0-9][a-zA-Z0-9-]+$ ]]; then
|
|||||||
# User Exists
|
# User Exists
|
||||||
echo "\"$1\" Exists" >> $LOGFILE
|
echo "\"$1\" Exists" >> $LOGFILE
|
||||||
else
|
else
|
||||||
useradd -G webadd -m -b /htusers -s /usr/bin/bash "$1"
|
useradd -G webadd -m -b /htusers -s /usr/bin/bash --gid 1004 "$1"
|
||||||
|
ln -s "/htusers/$1/public_gemini /var/gemini/$1"
|
||||||
echo "Added \"$1\" to the system" >> $LOGFILE
|
echo "Added \"$1\" to the system" >> $LOGFILE
|
||||||
fi
|
fi
|
||||||
# Ensure SSH filder exists
|
# Ensure SSH filder exists
|
||||||
|
Loading…
Reference in New Issue
Block a user