Advertisement
mmornati

Untitled

Jul 28th, 2011
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | None | 0 0
  1. cat > ./html/.htaccess << 'EOF'
  2. AuthUserFile /var/hda/web-apps/http.users
  3. AuthGroupFile /dev/null
  4. AuthName "User Login Required for This Area"
  5. AuthType Basic
  6. <Limit GET POST>
  7.     require valid-user
  8. </Limit>
  9. EOF
  10.  
  11. htpasswd -c -b ../http.users backuppc password;
  12.  
  13. mkdir -p elevated;
  14. cd elevated;
  15. cat > backuppc-install-script << 'EOF'
  16. chown apache:users ../html/.htaccess;
  17. mv /etc/httpd/conf.d/BackupPC.conf /etc/httpd/conf.d/BackupPC.conf.bak;
  18. echo "hda         0       backuppc" >> /etc/BackupPC/hosts;
  19. sed -i "1922s|''|'admin'|" /etc/BackupPC/config.pl;
  20. sed -i "1923s|''|'backuppc'|" /etc/BackupPC/config.pl;
  21. /sbin/service backuppc restart;
  22. EOF
  23. chmod +x backuppc-install-script;
  24. sudo ./backuppc-install-script;
  25. cd ..;
  26. rm -rf elevated;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement