Syed Jahanzaib Personal Blog to Share Knowledge !

March 29, 2010

*nix: Howto Shutdown Remote MS AD Server/Clients

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 7:21 AM

Following is a script I created to remotely shutdown the remote Microsoft AD Server / Member Server’s & Clients.
=================================================

[root@gw /]# cat zshut

#shutting down microsoft AD Member Server / Applicaiton Server’s / client Pc (shutdown AD in last)

net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.1
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.2
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.3
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.4
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.5
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.6
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.7
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.8
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.9
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.10
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.11

# shutting down local linux system . . ,
shutdown -h -P now
shutdown -h now

[root@gw /]#

March 13, 2010

Show Hidden Files and Folders not working !

Filed under: Microsoft Related — Syed Jahanzaib / Pinochio~:) @ 7:47 AM

1- Click Start –> Run –>

regsvr32 /i browseui.dll

A confirmation message will appear like given below

2- Click Start –> Run –>

regsvr32 /i shell32.dll

Wait for the confirmation and click OK.

P πŸ˜‰

March 12, 2010

how to prevent regedit, taskmanger, msconfig etc from closing within second of it’s opening

Filed under: Microsoft Related — Syed Jahanzaib / Pinochio~:) @ 10:59 AM

Symptoms of the problem that we are tying to solve,

  1. you open regedit, the regedit window flickers and closes again,
  2. you open taskmanager, window opens and immediately closes.
  3. you try to open msconfig, window closes the moment it opens.

What might be happening?

Some rouge process is running that is scanning for these applications and the moment they open, it closes them.

So let’s start the identification process,

just a warning, this is a repetitive and frustrating process but if you really want to use the taskmanger, regedit or msconfig then you will have to find the process and kill it, so let’s start the journey.

you will need to download Process Explorer from system internals, so that we can identify the culprit process.

once you have downloaded it, extract the zip file and run the procexp.exe file by double clicking it. This will show you all the processes running right now.

I found the svchosl.exe (hidden in windows\system32\) file, after killing it , I was able to open all the effected tasks like taskmanager, regedit etc.Β  I even deleteed it, but after every restart, the problem came back,

So I kill it again using process explorer, then open the regedit, and search for ‘svchostl.exe’ , and delete all its entries (about 5-6 entries in various paths), it was set to re create its copy in windows shell / yahoo messenger and many other windows essential programs.

Everything is fine now.
Thanks to the

HTH,

Happy Hunting πŸ˜‰

πŸ™‚

SYED JAHANZAIB
KDC IT DEPT.

NEW ALLIED ELECTRONICS INDUSTRIES (PVT) LTD.
http://WWW.NAE.COM.PK

March 11, 2010

*nix: MRTG RRD & FIND command

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 8:48 AM

“ERROR: could not find RRDs.pm. Use LibAdd: in mrtg.cfg to help mrtg find RRDs.pm”
solution was:
yum install perl-rrdtool rrdutils php-rrdtool

find / -name ‘mypage.htm’

*nIX KILL: howto terminate a process using kill

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 6:27 AM

Use ps command or pidof command to find out process ID (PID). Syntax:
ps aux | grep processname
pidof processname

For example if process name is yum, you can use any one of the following command to obtain process ID:
# ps aux | grep yum

OR use pidof command which is use to find the process ID of a running program:
# pidof yum

kill process using PID (process id)

Above command tell you PID (3486) of lighttpd process. Now kill process using this PID:
# kill 3486
OR
# kill -9 3486
Where,

  • -9 is special Kill signal, which will kill the process.

killall command examples

You can also use killall command. The killall command kill processes by name (no need to find PID):
# killall -9 yum


Create a free website or blog at WordPress.com.