This commit is contained in:
simono41 2018-03-28 07:33:47 +02:00
parent bb2f548f7c
commit c74c805b43
2 changed files with 6 additions and 2 deletions

View file

@ -4,7 +4,7 @@ set -ex
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2
sudo $0 sudo $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
exit 0 exit 0
fi fi
echo "Als root Angemeldet" echo "Als root Angemeldet"
@ -155,6 +155,7 @@ function copyconfig() {
#links #links
links links
userrechte userrechte
rootrechte
} }
function userrechte() { function userrechte() {
@ -172,6 +173,9 @@ function userrechte() {
chmod 600 /home/"$username"/.ssh/authorized_keys chmod 600 /home/"$username"/.ssh/authorized_keys
fi fi
}
function rootrechte() {
#root #root
chmod 750 -Rv /root chmod 750 -Rv /root
#ssh-root #ssh-root

View file

@ -12,7 +12,7 @@ user="user1"
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2
sudo $0 sudo $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
exit 0 exit 0
fi fi
echo "Als root Angemeldet" echo "Als root Angemeldet"