Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- pass="redhat" &&
- EXPORT=$pass &&
- apt-get update -y &&
- apt-get install xorg lxde-core firefox tightvncserver flashplugin-installer tightvncserver chromium-browser -y &&
- umask 0077 &&
- mkdir -p "$HOME/.vnc" &&
- chmod go-rwx "$HOME/.vnc" &&
- sleep 1 &&
- echo "redhatnredhatnn" |vncpasswd &&
- sleep 1 &&
- touch $HOME/.vnc/xstartup &&
- echo '#!/bin/bash
- xrdb $HOME/.Xresources
- xsetroot -solid grey
- #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
- x-window-manager &
- lxterminal &
- /usr/bin/lxsession -s LXDE &
- # Fix to make GNOME work
- export XKL_XMODMAP_DISABLE=1
- /etc/X11/Xsession ' > /root/.vnc/xstartup &&
- chmod +x /root/.vnc/xstartup &&
- sleep 1 &&
- vncserver :8 &&
- sleep 1 &&
- adduser --quiet --disabled-password james --gecos 'Jimmy, , , , , ' &&
- sleep 1 &&
- user="james"
- echo "$user:$pass" | chpasswd &&
- sleep 1 &&
- rsync -a /root/.vnc /home/james &&
- sleep 1 &&
- chown -Rf james:james /home/james/.vnc &&
- sleep 1 &&
- wget https://download.configserver.com/csf.tgz && tar -zxvf csf.tgz && cd csf && chmod +x install.sh && sh install.sh &&
- iptables -I INPUT -p tcp --dport 5909 -j ACCEPT &&
- iptables -I INPUT -p tcp --dport 5908 -j ACCEPT &&
- iptables-save &&
- csf -r &&
- sleep 1 &&
- sudo vncpasswd -f <<</root/.vnc/passwd >"/home/james/passw &&
- su -c "vncserver :9" -s /bin/sh james &&
- sleep 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement