Last active
March 19, 2018 11:10
-
-
Save bluefangs/31aa257143c1a1e0d4b757a46585d9d1 to your computer and use it in GitHub Desktop.
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
sudo apt-get update <-- update | |
sudo apt-get install curl <-- install curl | |
apk add inotify-tools <--for the filewatcher methods | |
#### openssh-server ### | |
sudo apt-get install openssh-server <-- install ssh server | |
vi /etc/ssh/sshd_config | |
Port 22 <-- uncomment this | |
PermitRootLogin yes <-- add this if you want ssh access to root | |
save | |
service sshd restart <-- restart the shh daemon | |
#### install docker #### | |
sudo apt-get install docker | |
sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
#### Create non sudo user #### | |
sudo useradd -d /home/potato -m potato <-- create potato user with home dir | |
sudo passwd potato <-- set password for potato user | |
#### Allow potato user to networking and power related commands #### | |
visudo <-- open sudoers file | |
Add the below line to it. | |
potato ALL = NOPASSWD: /sbin/ifconfig | |
potato ALL = NOPASSWD: /sbin/route | |
potato ALL = NOPASSWD: /sbin/reboot | |
potato ALL = NOPASSWD: /sbin/shutdown | |
save | |
More info here: https://forums.fedoraforum.org/showthread.php?180471-Editing-sudoers-to-allow-ifconfig-only-on-certain-interfaces | |
potatop user can now setip using: sudo setip 1.2.3.4 | |
sudo route add -net 0.0.0.0/0 gw <gate_way> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment