Showing posts from July, 2008

The UNIX tr command

$> tr ',' '\012' <> return.txttr is the program doing the work.
',' is the character I want to replace (in this case a comma).
'\012' is the octal value for a newline in UNIX.
comma .txt is the file I am reading from.
return.txt is the new file I am saving my changes to.from :

HOW TO: Apply Local Policies to All Users Except Administrators on Windows Server 2003 in a Workgroup Setting

This article describes how to apply local policies to all users except administrators on a Windows Server 2003-based computer that is in a workgroup setting.

When you use a Windows Server 2003-based computer in a workgroup setting (not a domain), you may have to implement local policies on that computer that can apply to all users of that computer, but not to administrators. This exception permits the administrator to retain unlimited access and control of the computer, and also permits the administrator to restrict the users who can log on to that computer.

The Windows Server 2003-based computer must be in a workgroup setting for this procedure to work. In this situation, the domain policies cannot overwrite the local policies because the domain policies do not exist. Microsoft recommends that you make backup copies of all the files that you edit during this procedure.

ripped from :

Group Policy application rules for domain controllers

Domain controllers pull some security settings only from group policy objects linked to the root of the domain. Because domain controllers share the same account database for the domain, certain security settings must be set uniformly on all domain controllers. This ensures that the members of the domain have a consistent experience regardless of which domain controller they use to log on. Windows 2000 accomplishes this task by allowing only certain setting in the group policy to be applied to domain controllers at the domain level. This group policy behavior is different for member server and workstations.

ripped from :

Managing Policy in Active Directory

Apply Local Policies to All Users Except Administrators in a Workgroup Setting

To implement local policies to all users except administrators, follow these steps:

1. Log on to the computer as an administrator.

2. Open your local security policy. To do this, do one of the following:

• Click Start, click Run, type gpedit.msc, and then press ENTER.


• Click Start, click Run, type mmc, press ENTER, add the Group Policy Object Editor, and then configure it for the local security policy. If the removal of the run command is one of the policies that you want, Microsoft recommends that you edit the policy by means of Microsoft Management Console (MMC), and then save the results as an icon. Then, you do not need the run command to reopen the policy.

3. Expand the User Configuration object, and then expand the Administrative Templates object.

4. Enable whatever policies that you want (for example, Desktop for "Hide My Network Places" or "Hide Internet Explorer Icon on Des…

How to set account lockout policies in Windows 2000 and Windows Server 2003

To help secure your network, you can use account lockout policies for domain accounts or for local user accounts. An account lockout policy is a Microsoft Windows security feature that locks a user account if a designated number of failed logon attempts occur within a specified time frame. These variables are based on security policy lockout settings. You cannot log on to the network through a locked account until the lockout period has expired.

In Microsoft Windows 2000 and in later versions of Windows, you can configure account lockout policies in the Active Directory directory service. To configure account lockout policies in Windows 2000, use the ADSI Edit snap-in to edit Active Directory and to change the PwdProperties attribute in the domain naming context. When you make this change on one domain controller, the change is replicated to all other domain controllers on your network.

ripped from :

How To Reset User Rights in the Default Domain Group Policy in Windows Server 2003

This article describes how to reset user rights in the default domain Group Policy object (GPO) in Windows Server 2003. The default domain GPO contains many default user-rights settings. Sometimes, if you change the default settings, unexpected restrictions may be put on user rights. If the changes are unexpected or if the changes were not recorded so that you do not know which changes were made, you may have to reset the user-rights settings to their default values.

This situation may also occur if you manually rebuild the contents of the Sysvol folder, or if you restore it from a backup by using the steps that are included in the following Microsoft Knowledge Base article:

How To Create a System Policy Setting in Microsoft Windows Server 2003

This step-by-step article describes how to create System Policy settings for down-level client computers in a Windows Server 2003 domain. In a Windows Server 2003 network, you can use Group Policy settings to configure and control Windows Server 2003-based computers, Windows 2000-based computers, and Microsoft Windows XP Professional-based computers. However, to configure Microsoft Windows NT 4.0-based client computers, Microsoft Windows Millennium Edition-based client computers, and Microsoft Windows 98-based client computers, you must use System Policy settings. System Policy settings are different from Windows Server 2003 Group Policy settings in that they overwrite registry settings on the client computer with persistent changes. This behavior is known as "tattooing."ripped from :

Appending to Perl's @INC array

The @INC array is a list of directories Perl searches when attempting to load modules. To display the current contents of the @INC array:

perl -e "print join(\"\n\", @INC);"

The following two methods may be used to append to Perl's @INC array:1. Add the directory to the PERL5LIB environment variable.
2. Add uselib'directory'; in your Perl script.For more information, read the perlrun manpage or type perldoc lib.

ripped from :

Using Pointer in C

Now this is not your definitive guide to using pointer, it's more of a "i hope i won't forget this" kinda guide intended for yours truly.

To use pointer, you need to make sure you have 3 things:-

1. The pointer must be declared and allocated.
2. The pointee must be declared and allocated.
3. The pointer (1) must be initialized so that it points to the pointee (3).


int *p //step 1.
int i //step 2.

p = &i; //step 3.

*p = 42 //now you can use...

The important thing to remember is that when you declare something as a pointer - like p for instance, the value in p would be an address pointing to somewhere; so if let say you'd do a printf of p - you'll be shown the address of i, not the value of i.