Sunday, February 15, 2015

Remote access to Debian Printing (CUPS) web interface from LOCAL

The Common UNIX Printing System (or CUPS) is a printing system and general replacement for lpd and other older systems. The CUPS Debian packages forms a nice, powerful and relatively easy to use printing system on Debian. (http://www.cups.org/)

Install Software:

aptitude update
aptitude install cups cups-client

Start the software:

/etc/init.d/cups start

The easiest way is to use the cups web interface. You can see it by going to

http://localhost:631/admin

But to get to this page remotely for a server, you need to first make some edits to the cupsd.conf file. So do the following:

1. Edit the cups configuration file by first running the following command on your server:

sudo nano /etc/cups/cupsd.conf

2. Change this section :

# Only listen for connections from the local machine.
#Listen localhost:631
Port 631
Listen /var/run/cups/cups.sock

3. Then change this sections :

< Location / >
# Restrict access to the server...
Order allow,deny
Allow from@LOCAL
< /Location >
< Location /admin >
# Restrict access to the admin pages...
Order allow,deny
Allow from@LOCAL
< /Location >
< Location /admin/conf >
AuthType Default
Require user @SYSTEM
# Restrict access to the configuration files...
Order allow,deny
Allow from@LOCAL
< /Location >

4. Finally, restart cups with the following:

sudo /etc/init.d/cups restart

5. You should now be able to log into cups on your server with:

http://your_server_ip_address:631


Note that when you change something, it may tell you that you need to add a certificate to firefox. Do so by clicking the add/get certificate button at the bottom of the firefox error message page. It will also tell you that to change stuff, you need to use the "https" version of the page instead of "http" so just go to:

https://your_server_ip_address:631

You might also have to open/port forward tcp port 631.

Monday, October 13, 2014

Microsoft Excel Crack Sheet Protection Password


Microsoft Excel

Crack Sheet Protection Password

This routine provides a password to unprotect your worksheet. However, it may not give you the original password that was used.
Open the workbook that has the protected sheet in it. Hit Alt+F11 to view the Visual Basic Editor. Hit Insert-Module and paste this code into the right-hand code window:



Sub PasswordCracker()
  Dim i As Integer, j As Integer, k As Integer
  Dim l As Integer, m As Integer, n As Integer
  Dim i1 As Integer, i2 As Integer, i3 As Integer
  Dim i4 As Integer, i5 As Integer, i6 As Integer
  On Error Resume Next
  For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
  For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
  For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
  For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
    
       
 ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
      Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
      Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
  If ActiveSheet.ProtectContents = False Then
      MsgBox "One usable password is " & Chr(i) & Chr(j) & _
          Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
          Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
   ActiveWorkbook.Sheets(1).Select
   Range("a1").FormulaR1C1 = Chr(i) & Chr(j) & _
          Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
          Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
       Exit Sub
  End If
  Next: Next: Next: Next: Next: Next
  Next: Next: Next: Next: Next: Next

End Sub


Close the VB Editor window. Navigate to the worksheet you want to unprotect. Hit Tools-Macro-Macros and double-click PasswordCracker in the list.

Wednesday, September 24, 2014

How to set up a squid Proxy with basic Username and Password Authentication Using NCSA

You can configure Squid to prompt users for a username and password.
Squid comes with a program called ncsa_auth that reads any NCSA-compliant encrypted password file. You can use the htpasswd program that comes installed with apache2-utils to create your passwords. Here is how it's done:

1) Create the password file. The name of the password file should be /etc/squid/squid_passwd, and you need to make sure that it's universally readable.

[root@tmp]# touch /etc/squid/squid_passwd
[root@tmp]# chmod o+r /etc/squid/squid_passwd

2) Use the htpasswd program to add users to the password file. You can add users at anytime without having to restart Squid. In this case, you add a username called www:

[root@tmp]# htpasswd /etc/squid/squid_passwd www
New password:
Re-type new password:
Adding password for user www
[root@tmp]#

3) Find your ncsa_auth file using the locate command.

[root@tmp]# locate ncsa_auth
/usr/lib/squid/ncsa_auth
[root@tmp]#

4) Edit squid.conf; specifically, you need to define the authentication program in squid.conf, which is in this case ncsa_auth. Next, create an ACL named ncsa_users with the REQUIRED keyword that forces Squid to use the NCSA auth_param method you defined previously. Finally, create an http_access entry that allows traffic that matches the ncsa_users ACL entry. Here's a simple user authentication example; the order of the statements is important:

#
# Add this to the auth_param section of squid.conf
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

#
# Add this to the bottom of the ACL section of squid.conf
#
acl ncsa_users proxy_auth REQUIRED

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow ncsa_users

5) This requires password authentication and allows access only during business hours. Once again, the order of the statements is important:

#
# Add this to the auth_param section of squid.conf
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

#
# Add this to the bottom of the ACL section of squid.conf
#
acl ncsa_users proxy_auth REQUIRED
acl business_hours time M T W H F 9:00-17:00

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow ncsa_users business_hours

Remember to restart Squid for the changes to take effect.

Tuesday, September 23, 2014

Adobe acrobat pro 8.0/8.1 activated, re-activated

 Adobe Acrobat pro 8.0/8.1 RI count number solution to the problem can not be activated

If you have installed Adobe Acrobat Professional 8 can not be activated, or resume the installation, Adobe Acrobat Professional 8 need to re-activate, and different methods of activation activation method when first installed, after several tests can be re-activated:

Method One
  1.  delete files
    C: \ Documents and Settings \ All Users \ Application Data \ FLEXnet \ adobe_00080000_tsf.data
  2.  start Adobe Acrobat 8, wait for a while to re-activate the interface;
  3.  Click "Other activation options"
  4.  select "activate by phone" and press "OK"
  5.  running Adobe Acrobat 8 ??RI, copy the activation code to RI to obtain an authorization code, press the "Activate"
  6.  enter a new license key, press the "activate"

Method Two
  1.  delete files
    C: \ Documents and Settings \ All Users \ Application Data \ FLEXnet \ adobe_00080000_tsf.data
  2.  click Change serial number "
  3.  running Adobe Acrobat 8 ??RI, press the "Generate Serial" Get the serial number, enter the first line of the serial number and press the "Activate"
  4.  select "Adobe Acrobat 6 Standard, the second line of the input RI serial number and press" Next "
  5.  select the telephone activation "
  6.  Copy the activation code to RI to obtain an authorization code, press the "Activate"
  7.  Enter the new license key, press the "activation"

Adobe Acrobat 8.1 Professional software enables business professionals to reliably create, combine, and control Adobe PDF documents for easy,:)