Thursday, February 25, 2010

Debugging Function: Visual Basic.Net

Thursday, February 18, 2010

Auditing a Shared Folder

Windows 7 and Server 2008 both have the feature to audit File Share. As stated by Microsoft, "This security policy setting determines whether the operating system generates audit events when a file share is accessed." We will be using this feature as other Systems Administrators do to detect if there has been intrusion. Remember that to stop the intrusion, effective firewalls are necessary.
Follow these steps to use Audit File Share:
  1. Open Local Security Policy by clicking the Start button, typing secpol.msc into the search box, and then clicking secpol.If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  2. In the left pane, expand the Advanced Audit Policy Configuration folder. Expand System Audit Policies - Local Group. Double-click on Object Access.

  3. In the right pane double-click on Audit File Share.

  4. In the Audit File Share Properties window select the Configure the following events: check box. Then select the Success check box and the Failure check box to audit both successful and unsuccessful attempts to access a shared folder. Then click OK.
Source: http://technet.microsoft.com/en-us/library/dd772690%28WS.10%29.aspx

Friday, February 5, 2010

WAMP: MySQL



The debate was between whether or not MySQL when installed from WAMP would work on Server 2003 with SQL Server 2005 installed. The concern was that with the IIS already running that Apache would have a conflict. I installed WAMP. The WAMP notification icon was yellow indicating that one service was running. When I tried to start all services I received an error.
I was able to access MySQL, create add records to a table I created in a database I created.

Follow these instructions modifying names with your own.

Click on the MySQL console in WAMP Server.
When promted for a password hit enter (password is blank).
To Create a Database
type:
CREATE DATABASE database_name

To create a Table
type:
USE database_name; Create Table table_name (column_one text NOT NULL, column_two text NOT NULL, column_ID int(5) NOT NULL default '0' , PRIMARY KEY (column_ID) ) TYPE=MyISAM;

To add records to the Table
type:
USE database_name; Insert into table_name (column_one, column_two, column_ID) values ("value1", "value2", value3);

To display specific columns
type: USE database_name; Select column_one, column_two From table_name;

I learned how to create a database in MySQL from the MySQL Manual.
I learned how to create a table in MySQL from netadmintools.com.
I learned how to add records to a table from webdevelopersnotes.com

SQL Server 2005: Creating a View

Another day at work:
Let's say your boss wants to see orders with a line total less than $5. He is planning on writing up the Sales people who have made such orders. He just wants the line total.

Hint: The table used is sales.salesorderdetail.

In a New Query type:

USE AdventureWorks
Select
SalesOrderID, LineTotal

FROM
Sales.SalesOrderDetail

WHERE
LineTotal

Order by LineTotal

Execute and you will see two columns the SalesOrderID and the LineTotal. The Line Total will be ordered (sorted) least to greatest because of the "Order by" command.
If you want to know more about views see The Code Project article about Views.

Monday, February 1, 2010

Listing Files in Fedora


Fedora is a flavor of linux.
To list files in a specified directory use the ls command.

Option Description
-a Lists all filenames & --all
Lists all filenames

-A
Lists most filenames (excludes the . and .. special files)
--almost-all

-c
Lists filenames in column format

--color=n
Lists filenames without color

-d & --directory
Lists directory names instead of their contents

-f
Lists all filenames without sorting

see more ls command options