December 21, 2009

restore sites using rsync

http://www.eth0.us/restore

Script to remove gmail and yahoo accounts from a directory

perl -pi -e 's/.*((\@gmail\.com)|(\@yahoo\.com)).*//g' *

Url to unblock ip from comcast

http://www.comcastsupport.com/Forms/NET/blockedprovider.asp

To list files recursively with a permission

find . -type d -perm

Scripts for extracting

for i in `cat dbaccts`;do s=`du -sh $i`;echo " $s" >> dbacctscheck;done

for in in `cat dbacctsusers`;do grep $i /etc/userdomains >> dbacctsdomains;done

Script to ADD Multiple IP in a windows SERVER:

type this in start >> Run >> cmd.
FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection" 10.0.0.%I 255.255.255.0
This will add ips from 10.0.0.2 to 10.0.0.254
This example will add ip addresses from 10.0.0.2 to 10.0.0.254 with 1 step each time.
Terms Explained
--------------------
FOR /L %I IN (2,1,254)
2 -> First IP of the range
1 -> 1 Step.
254 -> Final IP of range.
Local Area Connection -> Connection Name.
255.255.255.0 -> Netmask

directadmin

directadmin does not use the root user and login. it actually displays the admin
user and password at the end of the install, but seems, it was not posted here.
if in the future you are sent a server with directadmin and the login has not
been provided, you can do what i did. i pasted the command and output below.

login as: root
root@66.90.73.12's password:
Last login: Sat Apr 18 22:37:23 2009 from 202.88.229.110
[root@fast ~]# cat /usr/local/directadmin/scripts/setup.txt
hostname=fast.box.net
email=admin@fast.box.net
mysql=wQ5CRFOf
mysqluser=da_admin
adminname=admin
adminpass=iwYrJ7an
ns1=ns1.box.net
ns2=ns2.box.net
ip=66.90.73.12
netmask=255.255.255.0
uid=1925
lid=43084
services=services_es50.tar.gz

Password of the IUSR and IWAM local accounts on a machine?

Usually the IUSR_ and IWAM_ passwords are set automatically and are never known. However, there are cases in which the passwords get out of sync or corrupted and need to be reset. The easiest way to reset these passwords is to extract the passwords that Microsoft IIS has in its metabase and update the accounts in Local Users and Groups to use that password.

You first need to update the adsutil.vbs script, which you'll find in the AdminScripts folder under the Inetpub folder, to display sensitive information (e.g., passwords) instead of just asterisks. Open the adsutil.vbs file in Notepad and search for the text IsSecureProperty = True, replace this text with IsSecureProperty = False and save the file. Now run the following commands to return the passwords (/anonymoususerpass is the IUSR account; /wamuserpass is the IWAM_ account).

How can I configure multiple Web sites using Host Headers?

Microsoft Internet Information Services (IIS) permits you to map multiple Web sites to a single IP address using a feature called Host Header Names. By assigning a unique host header name to each Web site, this feature permits you to map more than one Web site to an IP address.

Configure Web Sites by Using Host Header Names

To configure Web sites by using the Host Header Names feature, follow these steps:
1. Click Start, point to Administrative Tools, and then click Internet Information Services.
2. Expand * server name (where server name is the name of the server), and then expand Web Sites.
3. Right-click the Web site that you want, and then click Properties.

The Web site name Properties dialog box appears (where Web site name is the name of the Web site that you selected).
4. Click the Web Site tab, and then in the IP Address list, select the IP address that you want assigned to this Web site.
5. Click Advanced.
6. Under Multiple identities for this Web Site, click the IP address, and then click Edit.

The Advanced Web Site Identification dialog box appears.
7. In the Host Header Name box, type the host header that you want. For example, type www.example1.com. Add the port number, select the IP address in the list, and then click OK.

NOTE: If you want to configure this Web site with additional identities, click Add. Use the same IP address and TCP port, but enter a unique Host Header Name, and then click OK. For example, if you want to access the same Web site from both the Internet and a local intranet, you can configure the Web site identity in the manner shown in the following example:

IP Address TCP Port Host Header Name

192.168.0.100 80 www.example1.com
192.168.0.100 80 example1.com


8. In the Advanced Multiple Web Site Configuration dialog box, click OK.
9. In the Web site name Properties dialog box, click OK.

You return to the IIS window.
10. Right-click the next Web site that you want, and then click Properties.
11. In the IP Address list, select the same IP address that you selected in step 4, and then click Advanced.
12. Under Multiple identities for this Web Site, click the IP address, and then click Edit.

The Advanced Web Site Identification dialog box appears.
13. In the Host Header Name box, type a unique host header for this Web site. For example, type www.example2.com, add the port number, select the IP address in the list, and then click OK.
14. In the Advanced Multiple Web Site Configuration dialog box, click OK.
15. In the Web site name Properties dialog box, click OK.

You return to the IIS window.
16. Repeat steps 10 through 15 for each Web site that you want hosted on this IP address.
17. Register the host header names with the appropriate name resolution system -- for example, a Domain Name System (DNS) server or, in the case of a small network, a Hosts file.
The Web sites are now configured to accept incoming Web requests, based on their host header names.
More Information

Do not assign a host header name to the Default Web Site. Many programs expect the Default Web Site to use an IP address of (All Unassigned), TCP Port 80, and no host header name.
Troubleshooting

• Clients cannot connect to the Web sites by using the IP address:

Because there is more than one Web site configured to the IP address, you must connect to the Web site by using the host header name. When you try to connect to the Web site by using the IP address, you receive the following error message:
The page cannot be found.

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
• Clients cannot connect to the Web sites by using host header names:

Multiple host names must be mapped to the single IP address by using a DNS server or a Hosts file.

How can I back up IIS settings?

There are a number of ways to do this. The properties and values set in the Internet Information Services Manager console (the IIS snap-in) are stored in the Metabase.bin file located at C:\winnt\system32\inetsrv by default. In IIS 5.0, you can back up the metabase from inside the IIS snap-in. To do this, select the computer icon and right-click. Then select Backup/Restore configuration. You can then choose to back up your current metabase settings or restore a previous version. This same option is also available in MetaEdit 2.2.

When you save the metabase in this way, your backup is stored in the C:\winnt\system32\instrv\metaback folder as an .md0 file. The file will have the name you assigned when you made the backup, such as Pre-Lockdown.md0. If you create multiple backups with the same name, they will have incremental extensions such as Backup.md0, Backup.md1, and so forth.

In the event that your metabase is seriously corrupted, you may be unable to start IIS. In that case, you will not be able to do a restore from the IIS snap-in or metaedit. Should this occur, you can restore by replacing Metabase.bin with the most appropriate .md0 (.md1, etc.) metabase backup file from the metaback folder. Assuming that your backups are good, IIS will start right up.

There are two other means to make a backup of the metabase. You can simply copy Metabase.bin using xcopy, scopy, or any other copy routine. You should stop the Internet services first so that your metabase is up to date and not in use.

Finally, there are two scripts provided—metaback.vbs and metarest.vbs—which are located in Inetpub\IISSamples\sdk\admin (if you installed the IIS SDK on IIS 5.0) or in the IIS Resource Kit\Utility\ADSI Admin Scripts folder (if you installed the IIS 4.0 Resource Kit). These .vbs scripts use an ADSI command specifically provided to make metabase backups.

IIS Commands

Start IIS from command prompt

iisreset /start

Stop IIS from command prompt

iisreset /stop

Authentication Methods in IIS

Intoduction
In IIS you can setup various authentication methods for entire sites or virtual directories. These authentication methods determine who can access the Web pages in the site/virtual directory. The three Authentication methods available are:

1. Anonymous Access - This authentication method requires NO username or password to access the site. Anyone can just type in the URL and access the site. This is the default access method for IIS sites/virtual directories and is the authentication mode for 99.9999% of the World Wide Web.

2. Basic Authentication - The authentication method requires you to type in a valid NT login and password to gain access to the system (the NT login must be a valid NT login for the NT domain that the Web server is on). Where Basis Authentication is enabled you will get a popup window asking for the username and password when trying to first visit a resource in that protected site/virtual directory. After you enter the required information the username and password will be transmitted over the network WITHOUT any encryption. This will enable anyone trying to compromise your site examine passwords during the authentication process.

3. Windows NT Challenge/Response (referred to as Integrated Windows Authentication in IIS 5) - This is supposedly the most secure form of Authentication in IIS. When you login, NT validates your login and ONLY the username is transmitted over the network. No password is transmitted. So under no circumstances can your password be compromised. Note that this method will NOT work with Netscape!.

Changing ASP execution time-- IIS

Some tiems you need to cheng the asp script execution time, especially in the case of asp uploads

steps to follow

1. Open IIS

2. Navigate to

IIS-->websites-->domainname.com-->properties( right click)-->Home directory-->configuration (in the bottom half of home directory)-->options (second tab) // here you can find the asp execition time (usually one) change it /*!!!! DONT RESTART IIS !!!*/

What do I do if my Linux Server / Workstation does not boot?

Q. I’m using Debian Linux and CentOS operating system. My question is what do I do if my server refused to boot? How do I troubleshoot the problem?

A. Usually most Linux distribution provides rescue mode. It allows to access to disk partition and you are allowed to solve the problem.

To use the rescue mode of the install CD, follow these steps:
a) Boot from 1st CD / DVD media

b) Enter rescue at the prompt. (use ‘dd rescue‘ if you need to load the SCSI driver)

c) You will get at a shell prompt. Now you can reinstall boot loader or check disk for errors and so on.

Please note that Linux distributions such as Mandriva or Ubuntu Linux offers menu based troubleshooting options.

Linux Iptables ip_conntrack: table full, dropping packet error and solution

Q. My Red hat Enterprise Linux 5 server reporting the following message in /var/log/messages (syslog):

ip_conntrack: table full, dropping packet.

How do I fix this error?

A. If you notice the above message in syslog, it looks like the conntrack database doesn’t have enough entries for your environment. Connection tracking by default handles up to a certain number of simultaneous connections. This number is dependent on you system’s maximum memory size.

You can easily increase the number of maximal tracked connections, but be aware that each tracked connection eats about 350 bytes of non-swappable kernel memory!

To print current limit type:
# sysctl net.ipv4.netfilter.ip_conntrack_max
Output:

8192

To increase this limit to e.g. 12000, type:
# sysctl -w net.ipv4.netfilter.ip_conntrack_max=12000
Alternatively, add the following line to /etc/sysctl.conf file:
net.ipv4.netfilter.ip_conntrack_max=12000
The following will tell you how many sessions are open right now:
# wc -l /proc/net/ip_conntrack


Output:

5000 /proc/net/ip_conntrack

How do I find out Linux System Memory Utilization?

Q. How do I find out System / Server Memory Utilization under RHEL / CentOS / any other Linux distribution?

A. You need to use free command which, displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.
free command example

Type the free command at shell prompt:
$ free
$ free -m
Output:

total used free shared buffers cached
Mem: 2010 1965 45 0 152 776
-/+ buffers/cache: 1036 974
Swap: 2047 137 1910

vmstat command

vmstat command provides more information :
$ vmstat
Output:

procs ———–memory———- —swap– —–io—- –system– —–cpu——
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 140480 43636 158196 797692 1 0 108 220 1 4 7 5 87 1 0

Understanding vmstat memory options

* swpd: the amount of virtual memory used.
* free: the amount of idle memory.
* buff: the amount of memory used as buffers.
* cache: the amount of memory used as cache.
* inact: the amount of inactive memory. (-a option)
* active: the amount of active memory. (-a option)

$ vmstat -a
Output:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free inact active si so bi bo in cs us sy id wa st
0 1 140480 37376 109516 1730040 1 0 108 220 1 4 7 5 87 1 0

The following command displays one new line of utilization data every second
$ vmstat 1
The following command displays one new line per 2 second, but only for the next 10 seconds:
$ vmstat 2 10
Output:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free inact active si so bi bo in cs us sy id wa st
4 0 139216 23508 130644 1723680 1 0 108 220 1 5 7 5 87 1 0
2 0 139216 23252 130668 1723816 0 0 0 410 3242 11472 9 7 84 0 0
1 0 139216 23120 130656 1724012 0 0 0 750 3280 11592 3 6 90 1 0
0 0 139216 22996 130588 1724180 0 0 0 426 3272 11052 2 5 93 0 0
2 0 139216 20988 129932 1726980 0 0 6 1146 3353 12105 14 9 74 2 0
1 0 139216 20244 129900 1727216 0 0 0 392 3238 11752 8 7 85 0 0
1 0 139216 20120 129868 1727352 0 0 0 444 3197 11173 2 5 93 0 0
1 0 139216 25964 129852 1721044 0 0 0 268 3147 9269 1 4 95 0 0
3 0 139216 25964 129748 1721196 0 0 2 132 3199 10540 1 4 95 0 0
1 0 139216 25964 129676 1721332 0 0 0 456 3213 10608 2

Delete all root mail / inbox from a shell prompt

Delete all root mail / inbox from a shell prompt

Q. I’ve CentOS Linux acting as router for our small community based college. I see logwatch and other cron job generating emails for root account. How do I delete those emails? I don’t want to disable email facility but just wanted to get rid of all root emails.

A. The easilst way is to empty root / users email message file i.e. /var/spool/mail/root or /var/spool/mail/username. Simply type the following command at shell:

> /var/spool/mail/root

How to: Find Out Hard Disk Specs / Details on Linux:

Q. Can you tell me Linux command to find out information about my hard disk such as description, product name, bus type, size, cache memory size etc under Linux?


A.There are many tools to get this information. I recommend hdparm command which provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE device driver subsystem.

This command read / request identification information such as disk size, description and much more directly from the drive, which is displayed in a new expanded format.

Open the terminal and type the command:
# hdparm -I /dev/sda
OR
$ sudo hdparm -I /dev/sda
Output:

/dev/sda:

ATA device, with non-removable media
Model Number: ST3500630AS
Serial Number: 9XXYZ845YZ
Firmware Revision: 3.AAK
Standards:
Supported: 7 6 5 4
Likely used: 7
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63

CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 976773168
device size with M = 1024*1024: 476940 MBytes
device size with M = 1000*1000: 500107 MBytes (500 GB)
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec’d by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Recommended acoustic management value: 254, current value: 0
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* DOWNLOAD_MICROCODE
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* SATA-I signaling speed (1.5Gb/s)
* SATA-II signaling speed (3.0Gb/s)
* Native Command Queueing (NCQ)
* Phy event counters
Device-initiated interface power management
* Software settings preservation
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
not supported: enhanced erase
Checksum: correct

Linux port scanning with netcat (nc) command

Q. How do I find out which ports are opened on my own server? How do I run port scanning using nc command?

A. It may be useful to know which ports are open and running services on a target machine. You can use nmap command for port scanning.

If nmap is not installed try nc / netcat command. The -z flag can be used to tell nc to report open ports, rather than initiate a connection.

Run nc command with -z flag. You need to specify host name / ip along with the port range to limit and speedup operation.
$ nc -z vip-1.vsnl.nixcraft.in 1-1023
Output:

Connection to localhost 25 port [tcp/smtp] succeeded!
Connection to vip-1.vsnl.nixcraft.in 25 port [tcp/smtp] succeeded!
Connection to vip-1.vsnl.nixcraft.in 80 port [tcp/http] succeeded!
Connection to vip-1.vsnl.nixcraft.in 143 port [tcp/imap] succeeded!
Connection to vip-1.vsnl.nixcraft.in 199 port [tcp/smux] succeeded!
Connection to vip-1.vsnl.nixcraft.in 783 port [tcp/*] succeeded!
Connection to vip-1.vsnl.nixcraft.in 904 port [tcp/vmware-authd] succeeded!
Connection to vip-1.vsnl.nixcraft.in 993 port [tcp/imaps] succeeded!

Linux / UNIX: Scanning network for open ports with nmap command

You can use nmap tool for this job. It is flexible in specifying targets. User can scan entire network or selected host or single server. Nmap is also useful to test your firewall rules. namp is metwork exploration tool and security / port scanner. According to nmap man page:
It is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. While Nmap is commonly used for security audits, many systems and network administrators find it useful for routine tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.
nmap port scanning

TCP Connect scanning for localhost and network 192.168.0.0/24
# nmap -v -sT localhost
# nmap -v -sT 192.168.0.0/24
nmap TCP SYN (half-open) scanning

# nmap -v -sS localhost
# nmap -v -sS 192.168.0.0/24
nmap TCP FIN scanning

# nmap -v -sF localhost
# nmap -v -sF 192.168.0.0/24
nmap TCP Xmas tree scanning

Useful to see if firewall protecting against this kind of attack or not:
# nmap -v -sX localhost
# nmap -v -sX 192.168.0.0/24
nmap TCP Null scanning

Useful to see if firewall protecting against this kind attack or not:
# nmap -v -sN localhost
# nmap -v -sN 192.168.0.0/24
nmap TCP Windows scanning

# nmap -v -sW localhost
# nmap -v -sW 192.168.0.0/24
nmap TCP RPC scanning

Useful to find out RPC (such as portmap) services
# nmap -v -sR localhost
# nmap -v -sR 192.168.0.0/24
nmap UDP scanning

Useful to find out UDP ports
# nmap -v -O localhost
# nmap -v -O 192.168.0.0/24
nmap remote software version scanning

You can also find out what software version opening the port.
# nmap -v -sV localhost
# nmap -v -sV 192.168.0.0/24
A note about Windows XP / 2003 / Vista version

Windows user can find ipEye and IPSecScan utilities useful. Please note that Nmap also runes on Windows OS.

Read the man page of nmap for more information:
$ man nmap

Extract a selected file from tar.gz files

First unzip the file using

gunzip filename.tar.gz

This create a filename.tar file then to display the contets use

tar -t filename.tar

Then if you want to extract a file called abc.sql from that tar just give the command

tar -xvf /path/filename.tar -M /fullpath/abc.sql

It will be extracted to /fullpath/inside/abc.sql in the directory you are residing.

Linux Screen Command

GNU Screen enables you to run many shell processes in a single terminal. So in one e.g. xterm you can have many bash instances like layers in GIMP or Adobe Photoshop. Even better, you can split your terminal into different regions.

Steps
-----
1)Create a screen using the command
#screen -S niyas

2)Close the shell without logout

3)Open a new shell

4)Type screen -ls

[root@cochin1 ~]# screen -ls
There are screens on:
16921.joemon (Dead ???)
3981.name (Attached)
5002.niyas (Attached)
Remove dead screens with 'screen -wipe'.
3 Sockets in /tmp/screens/S-root.

5)You can login to that screen using the command screen -r 'screen name'

[root@cochin1 ~]# screen -r 5002.niyas
There is a screen on:
5002.niyas (Attached)

Installing Postgres in Cpanel Server

Please refer the url: http://www.scriptinstallation.in/cpanel_postgres.html

tar commands

tar is used to create a Tape ARchive. The resulting file is known as a tarball. It's pretty much the same concept as a

ZIP file, if you know what they are, but without the compression. To get the files out of a tarball, you can use the

following commands:

# tar xvf nobs.tar

If the tarball has also been gzipped (compressed), you can use the following command:

# tar xvfz nobs.tar.gz

If you only want certain directories from the tarball, do this:

# tar xvzf nobs.tar.gz */dir.you.want/*

If you have a .tar.bz2 file, then you need bzip2 installed (/usr/ports/archivers/bzip2), and you issue this command:

# tar yxf nobs.tar.bz2


tar
To tar up *.db in the current directory into a tarball called nobs.tar.gz, issue this command:

# tar cfz nobs.tar.gz *.db

The z option compresses.
listing the contents
To see a list of the files within a tarball, issue the following command:

# tar -tzf nobs.tar.gz

The -t provides a list. the -z indicates that the tarball is compressed. The -f identifies the tarball.

Here's an example:

# tar -tzf makeworld.991126.tgz
etc/
etc/protocols
etc/aliases
etc/services
etc/hosts

Windows Run Commands

Start Menu >> Run

Accessibility Controls - access.cpl
Add Hardware Wizard - hdwwiz.cpl
Add/Remove Programs - appwiz.cpl
Administrative Tools - control admintools
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
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
File Signature Verification Tool - sigverif
Findfast - findfast.cpl
Folders Properties - control 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
Iexpress Wizard - iexpress
Indexing Service - ciadv.msc
Internet Properties - inetcpl.cpl
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
Microsoft Chat - winchat
Minesweeper Game - winmine
Mouse Properties - control mouse
Mouse Properties - main.cpl
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
Password Properties - password.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon
Phone and Modem Options - telephon.cpl
Power Configuration - powercfg.cpl
Printers and Faxes - control printers
Printers Folder - printers
Private Character Editor - eudcedit
Quicktime (If Installed) - QuickTime.cpl
Regional Settings - intl.cpl
Registry Editor - regedit
Registry Editor - regedit32
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 Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Setting) - sfc /revert
System File Checker Utility (Purge File Cache) - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Telnet Client - telnet
User Account Management - nusrmgr.cpl
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Magnifier - magnify
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Windows Update Launches - wupdmgr
Windows XP Tour Wizard - tourstart
Wordpad - write

Hide Commands in Shell

Hide Commands in Shell

To hide the commands you are entering in shell, use "stty" command :)

#stty -echo

Now, all commands that you type are invisible.
To disable this mode, issue the following command at the shell prompt:

#stty echo

Kill processes for user

Kill processes for user

To easily kill all processes running under a user

ps -u USER | awk ‘{print $1}’ | xargs kill -9

or

pkill -u USER

replacing USER with the username.

To kill all specific processes such as php running under a user run,

ps -u USER | grep PROCESS |awk ‘{print $1}’ | xargs kill -9

replacing USER with username and PROCESS with php or any other process.

Changing permissions recursively

Changing permissions recursively

For changing the permissions of all the sub directories, please use the following

find . -type d -exec chmod 755 {} \;


For changing the permissions of all the sub directories, please use the following

find . -type f -exec chmod 644 {} \;

Unable to add an email account: Already exists

Its for Helm/ Mail enable.

We need to remove the email account from the mail enable database sql query
SELECT ID, Account, SourceAddress, DestinationAddress, Scope, Status
FROM ADDRESS_MAP
WHERE (SourceAddress = '[SMTP:jc.lim@asia-angle.com]')

DELETE FROM ADDRESS_MAP WHERE (SourceAddress = '[SMTP:jc.lim@asia-angle.com]')
this need to excute in mssql

Now try to add the account again.