Showing posts with label Sys Admin. Show all posts
Showing posts with label Sys Admin. Show all posts

Wednesday, July 24, 2019

Change date in Mac via terminal


Buy Moto series phones: Moto E, Moto G, Moto X or Other phones
Buy eBooks from Flipkart
-----------------------------------------------

sudo date MMDDHHmmYY

(Month,date,hour,minute,year)
For e.g.,  sudo date 0101101019 to change date to 10 hour 10 min of 2019 Jan 01.


Sunday, July 21, 2019

Sort unix folders by size


Buy Moto series phones: Moto E, Moto G, Moto X or Other phones
Buy eBooks from Flipkart
-----------------------------------------------

du -ks * | sort -n -r

 


Wednesday, July 18, 2018

Validate firewall connectivity using nc


Buy Moto series phones: Moto E, Moto G, Moto X or Other phones
Buy eBooks from Flipkart
-----------------------------------------------

In absence of telnet we can use nc (which version??) to validate connectivity.

nc -w 2 -v 10.0.0.1 < /dev/null; exitCode=$?; echo "Exit code = $exitCode"; if [ $exitCode -ge 1 ]; then echo "No connectivity"; else echo 'SUCCESS!!!'; fi; >> fw_validation.txt



Wednesday, November 1, 2017

Bash for loop examples


Buy Moto series phones: Moto E, Moto G, Moto X or Other phones
Buy eBooks from Flipkart
-----------------------------------------------

For loop example in bash script:
To get yarn log files for multiple spark jobs, we can use this command.
for i in `cat appid.txt`; do echo $i; yarn logs -applicationId $i > sparkjob_01sep_logs/$i.log; echo "——"; done




For loop with sequence and ssh into multiple servers:
To login into multiple servers and run a command, we can use below command.

for i in `seq 101 125`;do ssh -q machinename$i "hostname;ls -ltr";done



Monday, January 30, 2017

Create a desktop shortcut in Mac with Automator


Buy Moto series phones: Moto E, Moto G, Moto X or Other phones
Buy eBooks from Flipkart
-----------------------------------------------


Open Automator
File > New
select Application
Then add "Run Shell Script" option
Give the command to run, here I am giving Google chrome canary with no proxy option

/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-proxy-server=
Then Save with the name you want.







By default this will show automator icon.
Here is how to set your favorite icon.
Right click on Chrome canary icon and select "Get Info"



Then click on the icon and press Cmd+c
to copy the icon.
Now open info window on newly created icon, select the icon in the same place (which shows automator icon) press Cmd+v to paste the previously copied icon.


Change proxy settings only for Chrome


Buy Moto series phones: Moto E, Moto G, Moto X or Other phones
Buy eBooks from Flipkart
-----------------------------------------------

Disable proxy setting
Add command line parameter --no-proxy-server= to the command. (In windows, add this to the target path in the shortcut properties)

Specify different proxy
Add command line parameter --proxy-server="127.0.0.1:8080" to the command

Specify no proxy server list
Add command line parameter like this --proxy-bypass-list="127.0.0.1;localhost"


Thursday, April 10, 2014

What is Heartbleed Bug


It is basically a security bug (buffer overread) which is in the Open SSL implementation which is used by a looooooooot of websites on the internet to secure ( :) ) the communication between browser and website.

Jacob on stackexchange explained this issue in detail. Read his answer at superuser.com

Thursday, July 7, 2011

Find recursively and copy files in Unix

I was trying to do a recursive search in Unix using find command and then copy all those files to a specific folder.

I found below command does that.

find . -name *2011-03-19* -exec cp {} /home/Reddy/logs/ \;

Important thing is, we need to escape the ending semi-colon.

{} is the place holder for putting the search result, i.e., the file name found.

Wednesday, October 1, 2008

Enable the tools disabled by virus

If you got a virus usually it will disable the following things so that you can't be able to delete the virus.

It will disable Folder Options menu item from View menu, disables the Task Manager, and disables the Registry Editor.

You can enable all these from the Group Policy editor by yourself manually.

  • Go to Windows > Run > gpEdit.msc
  • Folder Options: Go to User Configuration > Administrative Templates > Windows Components > Windows Explorer > Removes the Folder Options menu item from the Tools menu. Disable this option. Now you should be able to see Folder Options in the View menu of your explorer window.
  • Task Manager: Go to User Configuration > Administrative Templates > System > Ctrl+Alt+Del Options > Remove Task Manger. Disable this option.
  • Registry Editor: Go to User Configuration > Administrative Templates > System > Prevent Access to Registry Editing Tools. Disable this option.
But, it is good to have alternatives for these things since viruses usually disables the default tools but not the alternative softwares.

You can use Process Explorer as alternative for Task Manager. Similarly you can use Explorer2 as alternative for default windows explorer. If you don't like Explorer2 many more explorer softwares are available, you can choose from any of those. I don't know alternatives for the Registry Editor. Please feel to share those you know in the comments section below.

Related Posts:
Stop viruses coming from Pen Drives
Remove Amvo.exe virus, Funny UST Scandal, Fun.exe DC.exe SVIQ.exe
Task Manager, Registry Accessing disabled?
Disable Autoplay, Messenger Service
Important steps while cleaning virus
What is this process

Subscribe to my site feed for receiving more tips. You can get more tips in your email for free.

Monday, May 12, 2008

Clean New Folder.exe, RegSvr.exe Virus

Recently I got infected with this virus. This virus just shows a message when windows started, "Rundll.exe is not found.......", and infecting the pen drives for first few days. Not much harm. But after 4 or 5 days it is starting creating copies of virus file in many folders. The copy will be having the same name as the folder name and it also having folder icon, so that we will think it as another folder.

When I have searched Internet, I got the following link useful Am I Works. I have developed a tool for removing this virus.

Download New Folder virus removal tool, unzip it, and double click on RemoveVirus.bat file. Tell me if you get rid of virus in comments section.

Note: If you are not able to open Registry Editor (Win+R, regedit.exe), See Accessing Registry disabled?

Subscribe to my site feed for receiving more tips. You can get more tips in your email for free.

Related:
Stop Viruses coming from Pen drives
Task Manager Disabled?
Important Steps when cleaning viruses

Sunday, May 4, 2008

Stop viruses coming from pen drives

Now a days pen drives ( or USB drives ) became necessary. But there is a problem with these pen drives. They can be very easily infected by viruses. But we can not live without using pen drives.

You can be a bit more careful and prevent them infecting your system with different types of viruses.

  • First disable auto play in your system. This prevents viruses in the pen drive from running automatically when pen drives are inserted into the system. (Please note that this will disable auto playing of CDs also).
  • After inserting pen drive into the system open it in explorer mode only, don't open it in My Computer.
    • To open Explorer, press Win+E on your keyboard.
    • Or right click on My Computer, and select explorer.
    • If My Computer is already opened, click on 'Folders' in the tool bar (or View menu> Explorer Bar> Folders).
  • Always open pen drive by clicking on the pen drive name from the left pane only. Don't open from right pane.
  • Don't open the files you don't need. If you find any file suspicious, right click on file name and select properties. It will show complete details about that file. Don't rely on icons. Some viruses use folder icon to make us think that they are folders, and most probably we will double click on that to see what is there in that folder which actually executes the virus.
A little careful handling of pen drives will prevent a lot many viruses.

Related:
Remove Amvo.exe virus, Funny UST Scandal, Fun.exe DC.exe SVIQ.exe
Task Manager, Registry Accessing disabled?
Disable Autoplay, Messenger Service
Important steps while cleaning virus
What is this process

Subscribe to my site feed for receiving more tips. You can get more tips in your email for free.

Thursday, March 13, 2008

How to delete Facebook Account?

You can deactivate your account, if you want to delete your account only temporarily. When you deactivate your account, you are like deleted from Facebook - no one can find your profile. Except all your data (friends, networks, etc...) will be saved, so that you can reactivate later.

To deactivate, click on 'account' at the top right corner. There will be 'deactivate' link at the bottom right. It will ask a reason when you clicked on the link. Select an option, and click on Deactivate button. If you want to reactivate, just login as usual. When you do that, Facebook sends a confirmation email to you. You can start using Facebook again by clicking on the confirmation link in the email.

If you want to permanently delete Facebook account, click on the following link and fill the form.
Delete Facebook Account

Links:
http://www.facebook.com/help/?faq=224562897555674&ref_query=delete+accou

Read More:
How to delete Gmail, Yahoo mail accounts
Backup dictionary in MS-Word
Backup Mails in Outlook Express
Open Multiple Firefox profiles at the same time
Firefox: View status bar in full screen

Subscribe to my site feed for receiving more tips. You can get more tips in your email for free.

Sunday, March 9, 2008

Removed Fun.exe, dc.exe, SVIQ.exe virus

I have got a virus, which automatically opening the Yahoo messenger. So, when I have looked the processes in the task manager, I have found the following processes Fun.exe, dc.exe, SVIQ.exe.

I killed those processes, by right clicking the process and select "End Process Tree". After I have killed all those processes, I searched Internet and found the following link W32.Imaut.AS (also called Dung Coi). Then I have deleted all the virus files and cleaned the registry.

I am describing the exact steps below:

  • First go to the task manager (right click on the task bar > task manager) and select the processes tab.
  • Right click on the Fun.exe, dc.exe, SVIQ.exe and select "End Process Tree". This stops the viruses from interrupting in the cleanup process.
  • Go to the MSConfig (Win+R, type MSConfig and press enter). Go to the startup tab. Uncheck the dc.exe, fun.exe, SVIQ.exe, Other.exe, Win.exe. This stop the virus processes from starting with the windows.
  • Next go to the Registry Editor (Win+R, type RegEdit and press enter). Remove the following keys
    • dc, dc2k5, fun under the key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
    • load, run under the key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
    • Go to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon and Modify Shell's value to "Explorer.exe".
    • Remove HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\dc
    • Remove HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\dc2k5
    • Remove HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\Fun
    • Remove HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\Load
    • Remove HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\Run
  • Delete the following files.
    • %Windir%\Help\Other.exe
    • %Windir%\inf\Other.exe
    • %Windir%\system\Fun.exe
    • %Windir%\System32\config\Win.exe
    • %Windir%\System32\WinSit.exe
    • %Windir%\dc.exe
    • %Windir%\SVIQ.exe
    • %Windir%\System32\NWB.dat
    • c:\PNga.txt
    • %Windir%\wininit.ini
I have created two files to automate the process of deleting the Registry keys, and the virus files. Download Fun Virus Removal, unzip it. Double click on the RemoveVirus.bat file.

Thats it. I got rid from the virus. I read in the net that this virus will create a copy of virus file in directories with the same name and uses a folder icon, so that users will click on it thinking it was a folder. But, I dint get any files like that, if you got any files like that, don't click on them, delete them immediately. If you have any doubt, right click on that and select properties, then you can know whether it is a file or folder.

Read More:
Important steps when cleaning virus
Disabling Auto Play in Windows
Task Manager Disabled?
Registry access disabled?
What is this Process?

Subscribe to my site feed for receiving more tips. You can get more tips in your email for free.

Latest Posts