-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e779593
commit 24901e2
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
source /opt/docker/mariadb/.env | ||
|
||
sudo userdel "$2" | ||
docker exec -it mariadb_db_1 mysql --password="$SQL_PASSWORD" backenddb -e "UPDATE user SET authorities = 'USER' WHERE name = '$1';" | ||
|
||
unset SQL_PASSWORD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source /opt/docker/mariadb/.env | ||
|
||
sudo useradd -m -p kit-finder-admin -g pse "$2" | ||
sudo -u "$2" mkdir "/home/$2/.ssh" | ||
sudo -u "$2" touch "/home/$2/.ssh/authorized_keys" | ||
echo "$3" | sudo -u "$2" tee -a "/home/$1/.ssh/authorized_keys" | ||
docker exec -it mariadb_db_1 mysql --password="$SQL_PASSWORD" backenddb -e "UPDATE user SET authorities = 'USER,ADMIN' WHERE name = '$1';" | ||
|
||
unset SQL_PASSWORD |