Esta dica ensina como aplicar uma senha nas pastas do apache para que antes de acessar uma pagina seja necessario fazer login. Lembre-se... linhas de comando comecadas com: "#" deve ser executado como usuario root "$" podem ser executadas como usuario comum1o Entre na pasta do apache que deseja proteger, por exemplo /var/www/seusite/Utilize o comando abaixo para criar o arquivo com a senha#htpasswd -c /var/www/seusite/.htpasswd nomedousuario2o Apos executar o comando ele vai pedir uma senha, que sera a de acesso junto com o nome do usuario. Explicando: "/var/www/pasta_com_senha/.htpasswd" e o arquivo que armazena a senha. Voce pode utilizar o nome que quiser porem por questoes de seguranca sempre o mantenha oculto. Obrigatoriamente ele deve estar na pasta que voce deseja proteger. "nomedousuario" e o usuario que vai acessar a pasta, voce pode escolher qualquer usuario.3o No arquivo de configuracao do Apache, /etc/apache2/apache2.conf, adicione a seguinte chave...AllowOverride NoneOptions Indexes MultiViewsOrder allow,denyAllow from allAuthType BasicAuthName "Acesso Restrito:"AuthUserFile "/var/www/seusite/.htpasswd"Require valid-user Explicando as ultimas linhas: "AuthType Basic" E o tipo de autenticacao "AuthName "Acesso Restrito:"" E a mensagem que aparece quando pedir a senha "AuthUserFile "/var/www/seusite/.htpasswd"" E o arquivo que armazena a senha "Require valid-user" Essa linha indica que usuario pode acessar Voce tambem pode trocar valid-user pelo nome do usuario.4o Renicie o apache...#/etc/init.d/apache2 stop#/etc/init.d/apache2 start5o Tente acessar sua pagina. How To Automate Changing The Local Administrator PasswordFonte: https://blogs.technet.microsoft.com/askpfeplat/2014/05/18/how-to-automate-changing-the-local-administrator-password/Hello again, Tom Ausburne with another post we think youll enjoy. With all of the security breaches we keep reading about on the Internet these days, I keep getting asked how to make servers and workstations less vulnerable to attack. The list of things you can do are extensive and more than I could ever cover in a single blog post. Today I decided to focus on one that is simple to implement, changing the local administrators password on a regular basis. If you only have one computer then this is an easy thing to do. But what about when you have thousands of servers and tens of thousands of workstations? Now we need a little bit of automation to keep things moving along smoothly.The first thing that might come to mind is to use Group Policy Preferences. Because of the security concerns with storing passwords in Group Policy Preferences, Microsoft just released a security patch, MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege, that removes this functionality. Once you apply this patch, this is no longer a usable option. Since some of you may be doing this already, I'll talk about this in a little detail and explain why we removed this.1. Start the Group Policy snap-in.2. Expand Computer Configuration3. Expand Preferences4. Click Control Panel5. Right-click Local Users and Groups6. From the menu select New Local User.7. Select Update as the action8. Type Administrator into the User name text box9. Type the new password into the Password text box, confirming the password in Confirm Password text box.10. Press OK.That was pretty simple right. It is, but it is not all that secure. You see the stored password is obfuscated. Thats is a fancy way