Tuesday, November 29, 2011

Windows Server 2008R2 CTRL-ALT-DEL doesn't work for VNC


So MS decided to disable software emulation of CTRL-ALT-DEL in Windows Server 2008R2, guess it propose some more vulnerability to Windows.. it caused some grief when using VNC viewer..

1. run -> gpedit.msc

2. Computer Configuration > Administrative Templates > Windows components -> Windows Logon Options -> "Disable or enable software Secure Attention Sequence".

3. Change the following:
Enabled
Services and Ease of Access applications

Thursday, November 24, 2011

python web login script


this script assumes the login website first return a page with session ID, second page would present the login and password field associated with the session ID.


on redhat, make sure you have python installed and also install mechanize:
yum install python-mechanize.noarch


#!/usr/bin/python
import mechanize
from urllib2 import urlopen
from ClientForm import ParseResponse


res1 = mechanize.urlopen("http://login.domain.com/")
#print res1.read()
forms = ParseResponse(res1, backwards_compat=False)
form1 = forms[0]


print "sessionID "
print form1["sessionID"]


res2 = mechanize.urlopen(form1.click())
#print res2.read()
forms = ParseResponse(res2, backwards_compat=False)
form2 = forms[0]


print form2


form2["username"] = "myusername"
form2["password"] = "mypassword"
urlopen(form2.click())
print urlopen(form2.click()).read()

Thursday, November 17, 2011

java default sizes

to see the default stack, heap sizes in IBM JRE/JDK, run this command:
java -verbose:sizes -version

Tuesday, November 8, 2011

Ubuntu chkconfig equivalent

what's the command line service config tool in ubuntu for different runlevel?

apt-get install sysv-rc-conf

Wednesday, July 27, 2011

Empathy logs in Ubuntu

Empathy logs your conversation by default and it seems to store its log in different locations between different releases? on ubuntuforum thread people found it under:
~/.gnome2/Empathy/logs
~/.local/share/Empathy/logs
~/.local/share/empathy


On my Ubuntu 10.10 I found them here:

~/.local/share/TpLogger/logs

Friday, July 8, 2011

Ubuntu 10.10 on Acer AspireOne 522

quite a few issues with Ubuntu 10.10 on AOD522


Problem #1 - it keeps hanging after login:
disable the atl1c driver and update the initramfs image:
add in /etc/modprobe.d/blacklist.conf this line
blacklist atl1c
update-initramfs -u



Problem #2 - getting AMD video driver to work:
sh ati-driver-installer-11-6-x86.x86_64.run --buildpkg Ubuntu/maverick
apt-get install -y debhelper dh-modaliases libqtgui4 execstack
sh ati-driver-installer-11-6-x86.x86_64.run --buildpkg Ubuntu/lucid
aticonfig --initial
aticonfig --resolution=0,1280x720

Problem #3 - speaker doesn't turn off after headset plugged in:
apt-get install pavucontrol
/etc/modprobe.d/options.conf
options snd-hda-intel model=laptop,dell-vostro position_fix=0,1

If you don't like the new interface with mutter, you can get the old netbook-launcher back:
apt-get install netbook-launcher-efl





Tuesday, July 5, 2011

USVN with Active Directory

to make USVN's LDAP working with Active Directory was tricky, use the following in config.ini

alwaysUseDatabaseForLogin = "admin"
authAdapterMethod = "ldap"
ldap.options.host = "domain.com"
ldap.options.port = "389"
ldap.options.username = "CN=username,CN=users,DC=domain,DC=com"
ldap.options.password = "password"
ldap.options.useStartTls = "0"
ldap.options.useSsl = "0"
ldap.options.bindDnFormat = "%s"
ldap.options.bindRequiresDn = "1"
ldap.options.baseDn = "DC=domain,DC=com"
ldap.options.accountCanonicalForm = "0"
ldap.options.allowEmptyPassword = "0"
ldap.options.optReferrals = "0"
ldap.options.accountDomainName = ""
ldap.options.accountDomainNameShort = ""
ldap.options.accountFilterFormat = "(&(objectClass=user)(sAMAccountName=%s))"
ldap.createGroupForUserInDB = "1"
ldap.createUserInDBOnLogin = "1"