Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. #!/bin/bash
  2. pass="redhat" &&
  3. EXPORT=$pass &&
  4. apt-get update -y &&
  5. apt-get install xorg lxde-core firefox tightvncserver flashplugin-installer tightvncserver chromium-browser -y &&
  6. umask 0077 &&
  7. mkdir -p "$HOME/.vnc" &&
  8. chmod go-rwx "$HOME/.vnc" &&
  9. sleep 1 &&
  10. echo "redhatnredhatnn" |vncpasswd &&
  11. sleep 1 &&
  12. touch $HOME/.vnc/xstartup &&
  13. echo '#!/bin/bash
  14. xrdb $HOME/.Xresources
  15. xsetroot -solid grey
  16. #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  17. x-window-manager &
  18. lxterminal &
  19. /usr/bin/lxsession -s LXDE &
  20. # Fix to make GNOME work
  21. export XKL_XMODMAP_DISABLE=1
  22. /etc/X11/Xsession ' > /root/.vnc/xstartup &&
  23. chmod +x /root/.vnc/xstartup &&
  24. sleep 1 &&
  25. vncserver :8 &&
  26. sleep 1 &&
  27. adduser --quiet --disabled-password james --gecos 'Jimmy, , , , , ' &&
  28. sleep 1 &&
  29. user="james"
  30. echo "$user:$pass" | chpasswd &&
  31. sleep 1 &&
  32. rsync -a /root/.vnc /home/james &&
  33. sleep 1 &&
  34. chown -Rf james:james /home/james/.vnc &&
  35. sleep 1 &&
  36. wget https://download.configserver.com/csf.tgz && tar -zxvf csf.tgz && cd csf && chmod +x install.sh && sh install.sh &&
  37. iptables -I INPUT -p tcp --dport 5909 -j ACCEPT &&
  38. iptables -I INPUT -p tcp --dport 5908 -j ACCEPT &&
  39. iptables-save &&
  40. csf -r &&
  41. sleep 1 &&
  42. sudo vncpasswd -f <<</root/.vnc/passwd >"/home/james/passw &&
  43. su -c "vncserver :9" -s /bin/sh james &&
  44. sleep 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement