Thursday, January 30, 2014

Apache install and initial configure in CentOS 6.5

Follow below steps to install Apache and bring web server up in CentOS 6.5

# yum install httpd

Edit below file,

# vi /etc/httpd/conf/httpd.conf

and change below values,

ServerTokens Prod
ServerSignature Off

:wq (save and exit)

If you are not able to load default page, check whether index.html is available in document root or create one.

If you have index.html in document root then allow in iptables setting (find steps here)

That should do the trick!!!

Apache server shows Connection time out in browser after installation in CentOS

After installing httpd in CentOS, webpage will not load by default

This is because of the iptables

run below command to solve the issue

# /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

# service iptables restart
 
That should do the trick!!!

Thursday, June 6, 2013

Upgrade SVN in Ubuntu 12.04

Follow below steps to Upgrade svn from 1.6 to 1.7

# echo "deb http://opensource.wandisco.com/ubuntu lucid svn17" | sudo tee /etc/apt/sources.list.d/svn.list
# sudo wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
# sudo apt-get update
# sudo apt-get install subversion

That should do the trick!!

Thursday, January 3, 2013

Append shell commands to history immediately

 When working with multiple terminals you can always face ssh timeout which will result in loss of command history of the particular session.

To prevent this, Add below line in "/etc/bash.bashrc" file

export PROMPT_COMMAND='history -a'

After logoff login, every time a shell command runs it will be immediately stored in history file.

That should do the trick!!!

Enable Timestamp in bash history for all users

Time Stamp in Linux history can save you from many tight corners.

To enable this, please add below line to "/etc/bash.bashrc" file

HISTTIMEFORMAT="%d-%h-%Y %T "

Logoff login will enable time stamp in history like below example

57  03-Jan-2013 07:15:22 history

That should do the trick!!!

Tuesday, July 3, 2012

Add Prefix or Suffix using Notepad++

Notepad++ is a great text document editor.

When a prefix or suffix need to be added to all lines in a text document, search and replace function of Notepad++ can be used.

Check out the image which shows how to do this.


In Find What enter "^(.+)$" without the quotes, in replace with column enter "<Prefix>\1" to add prefix or "\1<Suffix> to add suffix. Where <Prefix> and <Suffix> are the data you want to insert.

Also, make sure to keep the search mode in "Regular expression"

That should do the trick!!!

FTP Users with /bin/false shell not able to login to ftp site

It is common to have user shell under "/bin/false" to restrict ftp users from logging through SSH

It also prevents the user from logging in to ftp also. This can be solved by following below steps.

# vi /etc/pam.d/vsftpd

auth   required        pam_shells.so (Comment this line by adding a "#" in the front)

That should do the trick!!!

Friday, April 6, 2012

Unable to Add Printer in Windows XP

When trying to add a printer you receive a error "Unable to add printer. Operation could not be completed" Error and you receive error 126 in event log for these instance.

Solution:

In "Printers and Faxes" remove all printers and go to File menu, select Server Properties.

In Server Properties, open drivers tab and delete printer drivers

Stop Print Spooler Service.

Then go to %windir%\system32\spool\drivers\w32x86\3 directory

Backup the directory and remove all files and folders inside it

Start Print Spooler Service

Now you will be able to add printers.

If you  have problems with adobe PDF printer after following above steps, copy files related to adobe pdf from backup in the %windir%\system32\spool\drivers\w32x86\3 directory.

That should do the trick!!!

Friday, March 23, 2012

Network stucks at acquiring ip address in Windows XP

In Windows XP, Network does not acquire IP automatically and stucks forever at acquiring network address,

The possibilities are,

1. DHCP Service not running - Go to Start -> Run -> services.msc and start DHCP Client service and make it automatic.
2. Bad Network Cable - Replace Cable
3. Bad NIC Card - Service or Replace Network Card

that should do the trick !!!

Wednesday, March 14, 2012

How to disable Ctrl+Alt+Del restarting in Ubuntu

In Ubuntu, the action taken when Ctrl+Alt+Del pressed is based on the configuration file located in "/etc/event.d/control-alt-delete"
Just disable the line which specifies the restart action.


sudo vi /etc/event.d/control-alt-delete

comment the line

#exec /sbin/shutdown -r now “Control-Alt-Delete pressed”

:wq (save and exit)

that should do the trick!!!

How to disable Ctrl+Alt+Del restarting in CentOS

In CentOS, the action taken when Ctrl+Alt+Del pressed is based on the configuration file located in "/etc/init/control-alt-delete.conf"
Just disable the line which specifies the restart action.
 

vi /etc/init/control-alt-delete.conf

comment the line

#exec /sbin/shutdown -r now “Control-Alt-Delete pressed”

:wq (save and exit)

that should do the trick!!!

Disable Account Changes in Outlook Express

Open registry and create below key

System Key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Outlook Express]
Value Name:
No Modify Accts
Data Type:
REG_DWORD (DWORD Value)
Value Data:
(0 = default, 1 = enable restriction)

If you are an admin managing network computers, before trying to make any changes to account setting use regedit option "connect to network registry" in admin privileged login and change values to enable before going to edit in user login

that should do the trick !!!

Monday, January 9, 2012

Enable / Disable Change Of Date And Time On Windows XP

Go to Start > Control Panel > Administrative Templates

Open Local Security Policy

Go to Local Policy > User Rights Assignments > Change the System time, double click to open it.

Add and remove user groups. Remove the limited users from this list and those limited users will not be able to edit date and time of this compute. Add users who need access to change date / time



that should do the trick!!!

Sunday, November 6, 2011

Synchronize/Update Time on Active Directory DC

Thanks for those great guys mentioned this in the SBTG blog...


To update time with network time provider run the below commands...

On the main DC:
NET TIME /SETSNTP:time.windows.com
NET STOP W32TIME
NET START W32TIME
W32TM /config /reliable:YES
W32TM /resync /rediscover

On all other DCs:
W32TM /resync /rediscover


that should do the trick!!!

Tuesday, October 25, 2011

disable mails from CRON

This will help you disable email which are sent from cron whenever it runs.

Edit/Open your cron jobs
 
$ crontab -e

At the top of the file, enter:
 
MAILTO=""

Save with :wq and restart cron

$ /etc/init.d/crond restart


that should do the trick!!!

Tuesday, October 11, 2011

SEP 12 network threat protection not showing in GUI

After installing full package of SEP 12 you may not see Network Threat protection in SEP GUI.

This can be solved by following below steps.

1. Open cmd using run as administrator option,

2. Change to directory containing smc.exe and smcgui.exe (usually the bin directory inside installed directory, in my case C:\Program Files\Symantec\Symantec Endpoint Protection\12.1.671.4971.105\Bin)

3. run command "smc -stop", wait till symantec management console stops.

4. run command "smcgui.exe /UNREGSERVER"
5. run command "smcgui.exe /REGSERVER"
6. run command "smc -start", Check by opening SEP GUI, Network Threat protection will be available now.

that should do the trick!!!

Saturday, October 8, 2011

Install Webmin in CentOS 6, RHEL 6

Follow below steps to install webmin (Web based Administration Console) in Redhat based Linux systems

Install the Webmin Repository
# vi /etc/yum.repos.d/webmin.repo
input following lines,

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

quit by saving ":wq"

# rpm --import http://www.webmin.com/jcameron-key.asc

# yum install webmin

That should do the trick!!!

Tuesday, October 4, 2011

Outlook rules not working after importing pst

Rules will be available but will not work after importing pst from one machine to another, this is because outlook automatically adds a option while creating rules. This can be solved by below steps...

1. Go to Rules wizard...
2. In each rule you will see a option "on this machine only" selected
3. remove the selection and save the rule...

Thats it... enjoy

Wednesday, September 21, 2011

Clients not getting updated or removed from WSUS

solution for the clients which are not reporting or automatically removing from WSUS console.
Below are the simple steps to follow.

1.       Stop automatic updates services.
2.       Rename the software distribution folder.(c:\Windows\softwaredistribution)
3.       Restart automatic updates services
4.       Run wuaulct / reset authorization /detect now
5.       Run wuauclt / report now

Email with "QUIT" in message

User receiving emails with subject line "Fw:"  and Message body "QUIT", sender is a valid id and recipient is not disclosed "undisclosed recipients"...

Solution:

By checking message header found the machine in the network and in that outlook had a message with 210MB attachment which is way above the limit which was fixed. After deleting the mail from outbox the email with "QUIT" in message stopped.