Friday, March 26, 2010

Linux lock unlock user account

----------------------------script.sh---------------

#! /bin/sh
### BEGIN Script INFO
#
# Befor Usering it please check the user name
# file /root/users.txt
#

case "$1" in
lock)
data=`cat /root/users.txt`
for n in $data; do
usermod -L $n && echo "$n is locked"
done
;;
unlock)
data=`cat /root/users.txt`
for n in $data; do
usermod -U $n && echo "$n is unlocked"
done
;;
*)
echo "Usage: $0 {lock|unlock}" >&2
exit 1
;;
esac
exit 0

------------------
users.txt contains users id which have to be locked or unlocked

----------------------------run that script------------

/.script.sh lock

/.script.sh unlock

Wednesday, March 10, 2010

URL Rewriting - Create Search Engine Friendly URLs

URL Rewriting - Create Search Engine Friendly URLs

Add following line in web.config



url="~/Commodity.aspx"
mappedUrl="~/ProdAndServ/Commodity.aspx?id=2" />
url="~/Equity.aspx"
mappedUrl="~/ProdAndServ/InternetTrading.aspx?id=1" />



Tuesday, March 9, 2010

LD installation

@echo off

M:\3ldtransfer\oracle_10g_10.2.0.3_client\setup.exe
M:\3ldtransfer\VFP5.0\setup.exe

mkdir C:\LD
mkdir C:\ldoutput
copy M:\1SHARED\KshitijLD\LDfolder\*.* C:\LD\
copy m:\ld\ld.exe c:\ld\
copy "c:\ld\ld.exe.lnk" "C:\Documents and Settings\All Users\Desktop"

M:\3ldtransfer\idown\tv_enua.exe
M:\3ldtransfer\idown\spchapi.exe
copy M:\3ldtransfer\idown\BATANG.ttf C:\WINDOWS\Fonts\
copy M:\3ldtransfer\idown\dzc32e.exe C:\
C:\dzc32e.exe

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v apex /t REG_SZ /d m12
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v apexhome /t REG_SZ /d m:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v orahome /t REG_SZ /d m:

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v ConnectString /t REG_SZ /d sns0506srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v DSN /t REG_SZ /d sns0506odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0607odbc /v ConnectString /t REG_SZ /d sns0607srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0607odbc /v DSN /t REG_SZ /d sns0607odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0607odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0708odbc /v ConnectString /t REG_SZ /d sns0708srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0708odbc /v DSN /t REG_SZ /d sns0708odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0708odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0809odbc /v ConnectString /t REG_SZ /d sns0809srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0809odbc /v DSN /t REG_SZ /d sns0809odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0809odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0910odbc /v ConnectString /t REG_SZ /d sns0910srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0910odbc /v DSN /t REG_SZ /d sns0910odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0910odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

mkdir C:\oracle\product\10.2.0\client_1\network\ADMIN
copy M:\1SHARED\KshitijLD\tnsnames.ora C:\oracle\product\10.2.0\client_1\network\ADMIN
copy M:\1SHARED\KshitijLD\tnsnames.ora D:\oracle\product\10.2.0\client_1\network\ADMIN

Followers