Sunday, March 21, 2010

156 Useful Run Commands for windows XP

To Access… Run Command
Accessibility Controls access.cpl
Accessibility Wizard accwiz
Add Hardware Wizard hdwwiz.cpl
Add/Remove Programs appwiz.cpl
Administrative Tools control admintools
Adobe Acrobat (if installed) acrobat
Adobe Designer (if installed) formdesigner
Adobe Distiller (if installed) acrodist
Adobe ImageReady (if installed) imageready
Adobe Photoshop (if installed) photoshop
Automatic Updates wuaucpl.cpl
Bluetooth Transfer Wizard fsquirt
Calculator calc
Certificate Manager certmgr.msc
Character Map charmap
Check Disk Utility chkdsk
Clipboard Viewer clipbrd
Command Prompt cmd
Component Services dcomcnfg
Computer Management compmgmt.msc
Control Panel control
Date and Time Properties timedate.cpl
DDE Shares ddeshare
Device Manager devmgmt.msc
Direct X Control Panel (if installed)* directx.cpl
Direct X Troubleshooter dxdiag
Disk Cleanup Utility cleanmgr
Disk Defragment dfrg.msc
Disk Management diskmgmt.msc
Disk Partition Manager diskpart
Display Properties control desktop
Display Properties desk.cpl
Display Properties (w/Appearance Tab Preselected) control color
Dr. Watson System Troubleshooting Utility drwtsn32
Driver Verifier Utility verifier
Event Viewer eventvwr.msc
Files and Settings Transfer Tool migwiz
File Signature Verification Tool sigverif
Findfast findfast.cpl
Firefox (if installed) firefox
Folders Properties folders
Fonts control fonts
Fonts Folder fonts
Free Cell Card Game freecell
Game Controllers joy.cpl
Group Policy Editor (XP Prof) gpedit.msc
Hearts Card Game mshearts
Help and Support helpctr
HyperTerminal hypertrm
Iexpress Wizard iexpress
Indexing Service ciadv.msc
Internet Connection Wizard icwconn1
Internet Explorer iexplore
Internet Properties inetcpl.cpl
Internet Setup Wizard inetwiz
IP Configuration (Display Connection Configuration) ipconfig /all
IP Configuration (Display DNS Cache Contents) ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) ipconfig /flushdns
IP Configuration (Release All Connections) ipconfig /release
IP Configuration (Renew All Connections) ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) ipconfig /registerdns
IP Configuration (Display DHCP Class ID) ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) ipconfig /setclassid
Java Control Panel (if installed) jpicpl32.cpl
Java Control Panel (if installed) javaws
Keyboard Properties control keyboard
Local Security Settings secpol.msc
Local Users and Groups lusrmgr.msc
Logs You Out Of Windows logoff
Malicious Software Removal Tool mrt
Microsoft Access (if installed) msaccess
Microsoft Chat winchat
Microsoft Excel (if installed) excel
Microsoft Frontpage (if installed) frontpg
Microsoft Movie Maker moviemk
Microsoft Paint mspaint
Microsoft Powerpoint (if installed) powerpnt
Microsoft Word (if installed) winword
Microsoft Syncronization Tool mobsync
Minesweeper Game winmine
Mouse Properties control mouse
Mouse Properties main.cpl
Nero (if installed) nero
Netmeeting conf
Network Connections control netconnections
Network Connections ncpa.cpl
Network Setup Wizard netsetup.cpl
Notepad notepad
Nview Desktop Manager (if installed) nvtuicpl.cpl
Object Packager packager
ODBC Data Source Administrator odbccp32.cpl
On Screen Keyboard osk
Opens AC3 Filter (if installed) ac3filter.cpl
Outlook Express msimn
Paint pbrush
Password Properties password.cpl
Performance Monitor perfmon.msc
Performance Monitor perfmon
Phone and Modem Options telephon.cpl
Phone Dialer dialer
Pinball Game pinball
Power Configuration powercfg.cpl
Printers and Faxes control printers
Printers Folder printers
Private Character Editor eudcedit
Quicktime (If Installed) QuickTime.cpl
Quicktime Player (if installed) quicktimeplayer
Real Player (if installed) realplay
Regional Settings intl.cpl
Registry Editor regedit
Registry Editor regedit32
Remote Access Phonebook rasphone
Remote Desktop mstsc
Removable Storage ntmsmgr.msc
Removable Storage Operator Requests ntmsoprq.msc
Resultant Set of Policy (XP Prof) rsop.msc
Scanners and Cameras sticpl.cpl
Scheduled Tasks control schedtasks
Security Center wscui.cpl
Services services.msc
Shared Folders fsmgmt.msc
Shuts Down Windows shutdown
Sounds and Audio mmsys.cpl
Spider Solitare Card Game spider
SQL Client Configuration cliconfg
System Configuration Editor sysedit
System Configuration Utility msconfig
System File Checker Utility (Scan Immediately) sfc /scannow
System File Checker Utility (Scan Once At The Next Boot) sfc /scanonce
System File Checker Utility (Scan On Every Boot) sfc /scanboot
System File Checker Utility (Return Scan Setting To Default) sfc /revert
System File Checker Utility (Purge File Cache) sfc /purgecache
System File Checker Utility (Sets Cache Size to size x) sfc /cachesize=x
System Information msinfo32
System Properties sysdm.cpl
Task Manager taskmgr
TCP Tester tcptest
Telnet Client telnet
Tweak UI (if installed) tweakui
User Account Management nusrmgr.cpl
Utility Manager utilman
Windows Address Book wab
Windows Address Book Import Utility wabmig
Windows Backup Utility (if installed) ntbackup
Windows Explorer explorer
Windows Firewall firewall.cpl
Windows Magnifier magnify
Windows Management Infrastructure wmimgmt.msc
Windows Media Player wmplayer
Windows Messenger msmsgs
Windows Picture Import Wizard (need camera connected) wiaacmgr
Windows System Security Tool syskey
Windows Update Launches wupdmgr
Windows Version (to show which version of windows) winver
Windows XP Tour Wizard tourstart
Wordpad write

Tuesday, February 16, 2010

Delete Scheduled files every 2 weeks in linux Centos

find /var/spool/asterisk/monitor/ -mtime +12 -type f -exec rm -rf {} \;

Saturday, February 13, 2010

Debian isn't showing all my ram! Debian can't read all RAM x32 on x64 machine

But there's a problem; you ordered your system with 4 GB of RAM but you are only able to see 2. Well this may just be an issue with the default Debian kernel.
Section 1: Checking available RAM

1. First thing's first, how much RAM does your system believe that it has available?

toystory:~# free -m
total used free shared buffers cached
Mem: 1012 44 968 0 3 22
-/+ buffers/cache: 18 994
Swap: 94 0 94

2. You can also check the server physically to see what sort of RAM is actually installed if you have lshw installed. Let's install it and take a look:

toystory:~# apt-get install lshw
. . . installation of package should go okay here . . .
toystory:~# lshw -C memory

As with any command you will receive a fair amount of information that you were not necessarily looking for. The section that you are interested in will look something like this:

*-bank:0
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum0
vendor: Manufacturer0
physical id: 0
serial: SerNum0
slot: DIMM0
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)
*-bank:1
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum1
vendor: Manufacturer1
physical id: 1
serial: SerNum1
slot: DIMM1
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)
*-bank:2
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum1
vendor: Manufacturer1
physical id: 1
serial: SerNum2
slot: DIMM1
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)
*-bank:3
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum1
vendor: Manufacturer1
physical id: 1
serial: SerNum3
slot: DIMM1
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)

This should list the sticks of RAM that are actually installed to the system. Looks like 4 separate sticks of 1 GB RAM installed to me. Let's move on to solving this problem.
Section 2: The Bigmem Kernel
Due to some optimizations made at the kernel level of Linux there are a few different "maximum memory" specifications that are set to achieve maximum performance, but you are probably most concerned about getting to your RAM immediately, so let's get to that. The first thing that you need to do is install the "bigmem" kernel package if it is not already installed. Our default installations of Debian come with this installed so you should not need to do this, but just in case take the following steps.
1. Check to see if the kernel is already installed. If something like linux-image-2.6-686-bigmem shows up here, then skip down to Section 3 because you're all set

toystory:~# dpkg --get-selections | grep bigmem

2. Go ahead and install the package

toystory:~# apt-get install linux-image-2.6-686-bigmem

3. Check to make sure it's installed okay.

toystory:~# dpkg --get-selections | grep bigmem
linux-image-2.6-686-bigmem install
toystory:~#

That's all there is to the installation for our purposes. Custom kernel compilation is outside of the scope of this article.
Section 3: Configuring Grub
By default our installations of Debian use the grub bootloader. If you have not made any changes, a command like this will tell you what kernels you have configured within grub.

toystory:~# grep "Debian GNU" /boot/grub/menu.lst | nl -v0
0 title Debian GNU/Linux, kernel 2.6.18-5-k7
1 title Debian GNU/Linux, kernel 2.6.18-5-k7 (single-user mode)
2 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem
3 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem (single-user mode)
4 title Debian GNU/Linux, kernel 2.6.18-4-k7
5 title Debian GNU/Linux, kernel 2.6.18-4-k7 (single-user mode)

We want to use our bigmem kernel (not in single user mode of course) so we'll need to update the "default" entry in grub's configuration file.
1. So what is the current default entry?

toystory:~# grep ^default /boot/grub/menu.lst
default 0

2. So open your favorite text editor and find the line that says "default #" and change it to the number that you found above. Here we are in vi:
3. Now all you have to do is reboot. So give it a go and reboot to see what happens!

Thursday, February 11, 2010

Install Brekeke Advanced SIP on linux Debian!

first add deb http://ftp.nl.debian.org/debian/ lenny main contrib non-free

to /etc/apt-sources.list

then follow up this simple steps:
1- wget http://mirror.cc.columbia.edu/pub/software/apache/tomcat/tomcat-5/v5.5.28/bin/apache-tomcat-5.5.28.tar.gz

2- apt-cache search java | grep jdk

3- apt-get install sun-java6-jdk

4- tar -xzvf apache-tomcat-6.0.24.tar.gz

5- mkdir /usr/local/tomcat5.5

6- gulfsip:/home/downs# mv apache-tomcat-5.5.28 /usr/local/

7- gulfsip:/usr/local/tomcat5.5# mv apache-tomcat-5.5.28/ tomcat5.5

8- export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12
export PATH=/usr/lib/jvm/java-6-sun-1.6.0.12/bin:$PATH

9- Start tomcat /usr/local/tomcat5.5/bin/./startup.sh

10- copy the proxy.war file into: /usr/local/tomcat5.5/webapps

11- Make sure Tomcat is running: http://X.X.X.X:8080/

12- run the SIP server: http://X.X.X.X:8080/proxy

Wednesday, February 10, 2010

ConfigServer Security & Firewall notes!!

My question was:
what if I did place my server IP: 10.54.6.170 in the csf.allow

and I want it as the ONLY server to access
10.54.6.170 for port 22
How I can restrict other IPs to access this 22 ports other than 10.54.6.170 ?


=======> ANSWER <
=======


Checking over the csf.allow file, I see it provides examples of what I think is very important to secure your server:

# The trust rules can be made in advanced format with 4 options
# (proto:flow:port:ip);
# 1) protocol: [packet protocol tcp/udp]
# 2) flow in/out: [packet direction, inbound or outbound]
# 3) s/d=port: [packet source or destination port]
# 4) s/d=ip(/xx) [packet source or destination address, masking supported]
#
# Syntax:
# proto:flow:[s/d]=port:[s/d]=ip(/mask)
# s - source , d - destination , flow - packet flow in/out
#
# Examples:
# inbound to destination port 22 from 192.168.2.1
# tcp:in:d=22:s=192.168.2.1
#
# outbound to destination port 23 to destination host 192.168.2.1
# out:d=23:d=192.168.2.1
#
# inbound to destination port 3306 from 192.168.5.0/24
# d=3306:s=192.168.5.0/24

here was my simple rule:
d=22:s=10.54.6.170/28
and I did restart /etc/nit.d/csf --restart


Saturday, April 5, 2008

PHP5 on IIS 6

Reference:
http://hostlibrary.com/ConfiguringPHP5torunonIIS6WindowsServer2003.html

About PHP5.
PHP5 is an "Open Source" scripting language and provides similar functionality to Microsoft's ASP. Obviously, both have their advantages and a comparison of the two technologies is outside the scope of this tutorial. However, a common misconception is that PHP is "Linux only" and not compatible with Microsoft systems.
To find out more about PHP, visit the following site:
http://www.php.net

1. Getting the PHP5 package.

A visit to the www.php.net downloads page reveals several choices in the "Windows Binaries" section. Download the zip package (details below):

  • PHP 5.0.4 zip package [7,488Kb]

(Please note that later versions may be available as you read this)

The ZIP package is the preferred option (when compared with the Installer) simply because it includes greater functionality and extensions. However, this should be obvious from the much greater download size.

2. Extracting the files:

Figure 1 - Extracting the files

Unzip the PHP archive to C:\PHP5 then copy "php5ts.dll" (highlighted in Figure 1 above) into C:\Windows\System32\

Next, copy "php.ini-recommended" to C:\Windows\ and rename it "php.ini" (in C:\Windows\).

3. Configuring Internet Information Services (IIS) Manager:

Figure 2 - Accessing the "Web Sites Properties" dialogue box in IIS

If you are using the new style Start menu, you can reach the Internet Information Services console by clicking “Start”, “Administrative Tools” and selecting “Internet Information Services (IIS) Manager” from the list.

If you are using the “Classic” style Start Menu, you can reach the console by clicking “Start”, “Programs”, “Administrative Tools” and select “Internet Information Services (IIS) Manager” from the list.

The first thing we need to do is tell IIS how it should process PHP files. To do this, first right-click on "Web Sites" in the left-hand menu and select "Properties" from the list that appears (as shown in Figure 2 above).

Figure 3 - Application Configuration

Once open, select the "Home Directory" tab and click on "Configuration". A similar window to figure 3 (above) will appear. Click on "Add".

Figure 4 - PHP Application Mappings

Complete the box shown in Figure 4 (above) as shown then press "OK". If you see a message appear with a list of "Child Nodes" you should check them carefully before selecting which should be PHP-enabled. Be particularly careful if you are running Microsoft Exchange Outlook Web Access (OWA) as overriding the OWA Virtual Directory settings will stop it from working!

IIS now knows how to process PHP files. However, it's "Web Service Extensions" rules still restrict it from doing this.

Figure 5 - Web Service Extensions

We now need to configure "Web Service Extensions" so right-click on "Web Service Extensions" in the menu on the left. Then select "Add a new Web service extension..." from the list (as shown in Figure 5 above)

Figure 6 - Creating a PHP web service extension

Complete the dialogue box as shown in Figure 6 above. Make sure you check the "Set extension status to Allowed" checkbox. The "Extension name:" is only a reference and hence can be anything - PHP makes it easy to identify in future though.

Figure 7 - The completed Web Service Extensions window

The completed "Web Service Extensions" window should now look like figure 7 above.IIS now knows to process PHP files and our "Web Service Extensions" have made it possible for PHP scripts to run freely.

4. Allowing index.php files to run as a directory default:

Figure 8 - Configuring your default PHP content page

Returning to "Web Sites Properties" dialogue shown in Figure 2 we need to select the "Documents" tab and click on "Add".

To ensure that index.php documents open as a default they should be added as a "Content Page" as shown in Figure 8. You can, of course, change the importance of PHP over ASP and HTML documents to suit your site based on which document type should take preference.

TESTING...

Figure 9 - Results.

Create a new text file and rename it "index.php". This file should contain one line that reads:

Simply copy this file to your web server and open it via your favourite web browser. You should be presented with a page similar to Fig. 9 above.

Monday, December 4, 2006

Remotely Enable Remote Desktop

Reference:
http://www.windowsdevcenter.com/pub/a/windows/2004/05/04/serverhacks_remote.html

Remote Desktop is a cool feature of Windows Server 2003 that lets you remotely log on to and work at a machine as if you were seated at the local console (in Windows 2000 Advanced Server, this feature was called Terminal Services in Remote Administration Mode). Remote Desktop can be a lifesaver for fixing problems on servers at remote sites, but what if you forgot to enable the feature before you shipped the server out to Kalamazoo? Enabling Remote Desktop is easy if the server is in front of you: just log on as an administrator, open System in Control Panel, select the Remote tab, and under Remote Desktop select the checkbox labeled "Allow users to connect remotely to this computer." Unfortunately, you can't use the System utility to enable Remote Desktop on a remote machine, though you can access some properties pages of System using Computer Management by first connecting the console to a remote computer, then right-clicking on the root node and selecting Properties. Unfortunately, as you can see in Figure 1 below, the Remote tab is not available when you access System properties this way on a remote machine (here named SRV220).

Figure 1
Figure 1. System properties for a remote machine does not have Remote tab.

Fortunately, there's a workaround. Sit down at your desk and log on to your Windows XP workstation using your administrator credentials and start Registry Editor by Start --> Run --> regedit --> OK. Then select the Connect Network Registry option under the File menu (Figure 2).

Figure 2
Figure 2. Connecting to the Registry on a remote machine.

This opens the Select Computer search box. Either browse Active Directory to locate the remote server, or type its name in the textbox (Figure 3).

Figure 3
Figure 3. Connecting to the Registry on a remote server named SRV220.

Click OK and a node will be displayed in Registry Editor for the remote machine (Figure 4).

Figure 4
Figure 4. HKLM and HKU hives on SRV220.

Now browse HKLM on SRV to find the following Registry key (Figure 5).

HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

Figure 5
Figure 5. Registry key for Terminal Server on remote machine.

Under the Terminal Server key, you'll find a REG_DWORD value named fDenyTSConnection. Double-click on that value to open the Edit DWORD Value box and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled), as in Figure 6 below.

Figure 6
Figure 6. Set fDenyTSConnections to 0 to enable Remote Desktop on SRV220.

The remote machine needs to be rebooted for the change to take effect, so open a command prompt and type the following command:

shutdown -m \\srv220 -r

After the remote machine reboots, Remote Desktop should be enabled on it. To test this from your workstation, open Start --> All Programs --> Accessories --> Communications --> Remote Desktop Connection, enter the name of the remote server in the Remote Desktop Connection logon box, supply your administrator password when prompted, and you're in.