Thursday, January 24, 2008

group file and shadow file

I manually modify /etc/group file, so the shadow file does not up-to-date. The will be fine when I use this server, but if I edit user/group information by GUI tool, it will pop up complain message. There are some commands to solve this problem pwconv, pwunconv, grpconv, and grpunconv. From man page, you can totally know how to use it.
FYI:
pwconv creates shadow from passwd and an optionally existing shadow.

pwunconv creates passwd from passwd and shadow and then removes shadow.

grpconv creates gshadow from group and an optionally existing gshadow.

grpunconv creates group from group and gshadow and then removes

Thursday, January 17, 2008

Outlook signatures

The files of signatures are placed in:

Folder: Documents and Settings\$USERNAME\Application Data\Microsoft\Signatures

Sunday, January 13, 2008

PHP permission denied

If you use SeLinux, there is a little bit modification. Because the security problmes, you must tell your system that which modules is trusted. After you run "apachectl start" and the unhappy error shows below:
XXXX. PHP5 cannot restore segment prot afterreloc: Permission denied
You should disable SELinux or issue "chcon -t texrel_shlib_t /usr/local/apache2/modules/*.so"

Monday, January 07, 2008

Translate Decimal / IP dotted quad

Here are simple functions to translate decimal/ip dotted quad in python.
Usage:
>dot2dec("64.233.189.99")
1089060195L
>dec2dot(1089060195L)
'64.233.189.99'
>
import types
def dot2dec(ipForm, useHex = False):
if type(ipForm) == types.StringType:
ipf = ipForm.split(".")
elif type(ipForm) in (types.ListType, types.TupleType):
ipf = ipForm
elif type(ipForm) in (types.LongType, types.IntType):
return None
return reduce(lambda a,b: long(a)*256 + long(b), ipf)

def dec2dot(numbericIP):
if type(numbericIP) == types.StringType and not numbericIP.isdigit() :
return None
numIP = long(numbericIP)
return "%d.%d.%d.%d" % ((numIP>>24)&0xFF, (numIP>>16)&0xFF, (numIP>>8)&0xFF, numIP&0xFF)




FYI:
python google group

Thursday, January 03, 2008

Chang default IGMP version in windows

The default version of IGMP in windows XP is Version 3. If you want to change to version 2, please flowing setups below:
1.Add new filed in registries and set default value is 3:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"IGMPVersion"=dword:00000003

2.reboot

CaptureSetup VLAN tags

These days, network adapter becomes more and more smart. It filters VLAN tags automatic, so you can not read this filed from packet filter such as Wireshark. If your network adapter is old or simple enough, you do not have to worry about this problem otherwise, you should add extra variable at your registries within your windows.For example, If you use Broadcom NIC, you need to do flowing steps below:
1.Find TxCoalescingTicks.
2.Add new string value which named PreserveVlanInfoInRxPacket and default value is 1.
3.Reboot.

FYI:
The Wireshark CaptureSetup VLAN

Apache POI

Apache announce new release of POI. Current version is 3.01 beta. POI is java implementation of the OLE 2 compound document format.
FYI:
Apache POI project