Sunday, October 30, 2011

Reduce Sharepoint Services 3.0 log.ldf files

q: our SharePoint services 3.0 log.ldf file is enourmous
a: using a post we found from Luka Manojlovic - just follow their steps:
  1. You can solve this problem by using “Shrink” command in the MS SQL Server Management Studio Express 
  2. First you need to connect to your Sharepoint 3.0 database called: \\.\pipe\mssql$microsoft##ssee\sql\query - just put this string in your “Server name” field: 
  3. \\.\pipe\mssql$microsoft##ssee\sql\query 
  4. Create full backup of all databases before continuing! 
  5. After that we should change restore mode from “Full” (this the parameter that allows .log.ldf to grow that large as transaction logs are not purged) to “Simple”:Expand Databases, right mouse click on Sharepoint_Config… Properties, Options, Recovery model: Simple and click OK
  6. Shrink the database procedure: Expand Databases, right mouse click on Sharepoint_Config… Tasks, Shrink, Files in File type select Log and click OK

Tuesday, October 18, 2011

FreeBSD Password Protected Folder

Issue: We were presented with a site hosted on a FreeBSD server that had a password protected folder when viewed with a browser.  The customer wanted to update the password.  They used to use http://home.flash.net/cgi-bin/pw.pl but it has been retired.
Solution: We were able to track down the password file the folder was using.  But we couldn't figure out how to encrypt a new password.
We discovered htpasswd on the FreeBSD Server.  We putty'd into the box, then ran htpasswd four times using each encryption method below.  Then copy/pasted that value into the password file next to the username until we could authenticate to the site.  We tested with the follow switches. 
  • -n = simply display the output (don't create a file)
  • -b = use the password from the command line
  • htpasswd -nb apacheuser topsecretpassword
  • htpasswd -nmb apacheuser topsecretpassword - "Force MD5 encryption"
  • htpasswd -nsb apacheuser topsecretpassword - "Force SHA encryption"
  • htpasswd -ndb apacheuser topsecretpassword- Uses Crypt 
We discovered the site was using Crypt as we were able to authenticate.