Created
December 28, 2021 22:50
-
-
Save scgoeswild/3d4fa92a0a3024b7ef9e1a662c3e7966 to your computer and use it in GitHub Desktop.
Jelastic root user
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
version: 1.5 | |
type: update | |
categories: | |
- apps/dev-tools | |
targetNodes: | |
nodeGroup: | |
- bl | |
- cp | |
- sqldb | |
- nosqldb | |
- build | |
- cache | |
- extra | |
name: Root Access | |
logo: https://blog.jelastic.com/wp-content/uploads/2015/11/cs-scheme1.png | |
homepage: https://docs.jelastic.com/ | |
description: | |
short: Enable a full root access to your container | |
text: The Root Access add-on reconfigures the container to provide you with a full root access. Be aware that such connection is extremely powerful and, if used inappropriately, may lead to your container / application failure. **Proceed on your own risk and only in case you know exactly what to do.** | |
onUninstall: | |
cmd [${targetNodes.nodeGroup}]: | |
- sed -i -e 's/.*NOPASSWD.*//g' /etc/sudoers.d/sudo | |
user: root | |
onInstall: | |
cmd [${targetNodes.nodeGroup}]: | |
- 'USER=$(grep -i ''x:''$(cat /etc/passwd | grep jelastic:x | cut -d'':'' -f 3) /etc/passwd | grep -v jelastic:x | cut -d: -f1)' | |
- 'touch /etc/sudoers.d/sudo' | |
- 'echo "$USER ALL=NOPASSWD: ALL" >> /etc/sudoers.d/sudo' | |
- 'echo "jelastic ALL=NOPASSWD: ALL" >> /etc/sudoers.d/sudo' | |
user: root | |
success: | |
text: | | |
The Root Access add-on was successfully installed. Access your container over SSH and run the **sudo su** command. *Note:* | |
Jelastic is not liable for any actions performed or damage caused via root to your container / application. | |
email: false | |
startPage: ${env.url} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment