Technology and troubleshooting.

Wednesday, January 11, 2017

Set download limit for yum

This tutorial describes how to set download limit for yum. By default there is no throttle limit for yum update, install and upgrade. yum updates consumes all the bandwidth in a network while downloading the yum updates. Overcome this we need to set throttle to limit the download speed for yum.
Set download limit for yum

[Redhat/Centos/Fedora] has an option which allows you to limit the download rate.
Step #1: Open the Linux terminal and travel to /etc/yum.conf using favourite editor.
[root@localhost ~]# vim /etc/yum.conf
add the following line at the end of the yum.conf
throttle=250k

Example:- To set throttle for yum
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
#This entry will limit the download rate to 250 kilobytes per second
throttle=250k 
That's it..
I hope this information is useful for you. Please forgive any typos or incomplete sentences.
Share:

Friday, November 11, 2016

Determining if ip address is already in use for device eth0 Centos

This tutorial describes how to fix determining if ip address is already in use for device eth0 while configuring the networking and do a network restart this error may occurred.



root@techlanda ~# service network restart Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Determining if ip address 10.26.112.35 is already in use for device eth0... Determining if ip address 10.26.112.35 is already in use for device eth0... Determining if ip address 10.26.112.35 is already in use for device eth0... root@techlanda ~#


Solution:- Something on the network is replaying that difference MAC address that one cause this error message Determining if ip address is already in use for device eth0. 
Just add this to your interface eth0 file.
ARPCHECK=no

root@techlanda ~# find /etc/sysconfig/network-scripts/ -name ifcfg-eth0\* -type f -exec sh -c 'echo ARPCHECK=no >> $1' -- {} \; root@techlanda ~# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none NM_CONTROLLED=no ONBOOT=yes TYPE=ethernet NETWORK=10.26.112.0 NETMASK=255.255.255.0 IPADDR=10.26.112.35 ARPCACHE=no root@techlanda ~# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
root@techlanda ~#

I hope this information is useful for you. Please forgive any typos or incomplete sentences.

Share:

Tuesday, November 8, 2016

How to fix Excel PasteSpecial grayed out

This tutorial describes how to fix Paste Special, Cut, Copy grayed out issue. This type issue may occurred while open the incompatible excel file which contions marco or working with ITR related excel sheet.


Excel PasteSpecial grayed out
Solution:-
Step #1
Right Click the Sheet1->Open View Code-> Microsoft visual basic wizard will open
View Code
Step #2 
Paste the below the code in the code editor and HIT Enter



Public Sub Menu_Reset()
    CommandBars("column").Reset
    CommandBars("row").Reset
    CommandBars("Cell").Reset
 End Sub

code editor
That's all above code will reset to excel configuration to default.

I hope this information is useful for you. Please forgive any typos or incomplete sentences.
Share:

Monday, October 17, 2016

How to Enable SSH Root Login in Debian 8

This tutorial describes how to enable ssh root login in debian 8 jessie. Why by default root login is not enabled in debian based operating system answer is simple Security reason. If the ssh is enabled for root users your system will be easily compromised by brute force attack

!!!Warning:- Enabling SSH root login is not recommended in production Environment.
Enable SSH root login on Debian Linux Server
My Scenario:-  There are some particular instances root login comes handy one such situation i faced was when convert the Physical Debian box into Virtual Environment.

Error:- 
login as: root
root@192.168.20.101's password:
Access denied
root@192.168.20.101's password:
Access denied
root@192.168.20.101's password:
Access denied
root@192.168.20.101's password:

Step #1
Login into Debain system using user account you had created earlier and switch to root user using "su".
superuser@GNS3-Test:~$ su
Password:[Your root password]

Step #2
root@GNS3-Test:/home/superuser# vi /etc/gdm3/daemon.conf
How to Enable SSH Root Login in Debian 8

Under security add “AllowRoot=true”. So your security section in the file should look like this:[security]

AllowRoot=true 
Once it looks like this save the file then exit the window.
Step #3 

root@GNS3-Test:/home/superuser# vi /etc/pam.d/gdm-password
comment this line "auth required pam_succeed_if.so user != root quiet_success"
#auth required pam_succeed_if.so user != root quiet_success
Step #4
root@GNS3-Test:/home/superuser#service ssh restart
â ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled)
   Active: active (running) since Mon 2016-10-17 16:25:04 IST; 11s ago
  Process: 896 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
 Main PID: 1431 (sshd)
   CGroup: /system.slice/ssh.service
           ââ1431 /usr/sbin/sshd -D

Oct 17 16:25:04 GNS3-Test systemd[1]: Started OpenBSD Secure Shell server.
Oct 17 16:25:04 GNS3-Test sshd[1431]: Server listening on 0.0.0.0 port 22.

Oct 17 16:25:04 GNS3-Test sshd[1431]: Server listening on :: port 22.

Now you should able to login root account through ssh 

I hope this information is useful for you. Please forgive any typos or incomplete sentences.

Share:

Tuesday, September 13, 2016

Rename local Administrator account via GPO

This tutorial describes how to rename the local administrator account via GPO. Why we need to rename the Built-in administrator account?
The Built-in Administrator account is one of the most targeted account easily guessed by anonymous person that are attempting to access your computer with full privileges.

Rename local Administrator account via GPO

Let's move on to the tutorial.
All the screenshots are taken from Windows 2012R2 and Windows 8.1 Client.

Step#1 Open the gpmc.msc 
how to open gpmc.msc
Step#2 Group Policy Management console Create a new policy and its named as Rename local Administrator Account for future reference.
[Your Domain]==>Group Policy Objects==>Right click New==>Name[Name for your Policy]

Create a new policy for rename local administrator account
Right click and Edit the newly created policy Rename Local Administrator Account.
Edit a new policy for rename local administrator account
 In Group Policy Management Editor Elapse==>Computer Configuration==>Policies==>Windows Settings==>Security Settings==>Local Policies==>Security Options==>Accounts: Rename administrator account==>Right Click Properties==>Check Define this Policy Settings checkbox==>Rename local Administrator name"Poweruser"
Edit a new policy for rename local administrator account
Step#3 Link a rename administrator account policy to Computer OU
link rename local administrator account for Computer OU
Step#4 Update the group policy in client computer.
RUN==>gpupdate /force refresh the lusrmgr.msc changes.
renamed local administrator account
I hope this information is useful for you. Please forgive any typos or incomplete sentences.
Share:

Monday, September 12, 2016

How to fix WAMP is not working on IIS installed machine

This tutorial describes How to fix WAMP is not working on IIS installed machine.

My Scenario:- My teammate informed me can you please check why WAMP service is not started?  I found the issue is caused by recently Installed IIS Web service on WAMP Server installed machine.

Troubleshooting:-
I logon the WMAP the sever type localhost on the browser it navigate to IIS default page.

IIS Default Page
Issue identified, IIS and WAMP Service are listing the same port (Port 80) to run Web Service. So i decided to change the listing port for WAMP Service in order to run WMAP service. 

Resolution:- How to change WMAP Listing Port:- 
Step#1 Travel to "C:\WAMP\bin\apache\Apache2.2.21\conf" directory.
WAMP Directory

Step#2  Open the httpd.config using text editor.
Step#3 Find the line Listen 80 in the httpd.conf file and change it to  "Listen 8080" (or assign any port which is not in use).


change wamp port Listen 8080

Step#4 Start the WAMP Service it will start working using Port 8080.
start wamp service

I hope this information is useful for you. Please forgive any typos or incomplete sentences.
Share:

Sunday, September 11, 2016

How to fix metasploit failed to connect to the database

This tutorial describes How to fix metasploit failed to connect to the database in Kali Linux2.0 Sana .

My scenario:- Today i did some experimental with Kali Linux Sana. I tired to connect metasploit database with postgresql it failed to connect database these is the error i got during experimental.
Error:-
root@kali:~# service postgresql start
root@kali:~# service postgresql status
postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; disabled)
   Active: active (exited) since Sun 2016-09-11 16:44:35 IST; 48min ago
  Process: 6448 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 6448 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service
root@kali:~# service metasploit start
Failed to start metasploit.service: Unit metasploit.service failed to load: No such file or directory.


  root@kali:~# msfconsole
                                                  ole.../
# cowsay++
 ____________
< metasploit >
 ------------
       \   ,__,
        \  (oo)____
           (__)    )\
              ||--|| *



Save 45% of your time on large engagements with Metasploit Pro
Learn more on http://rapid7.com/metasploit

       =[ metasploit v4.11.4-2015071403                   ]
+ -- --=[ 1467 exploits - 840 auxiliary - 232 post        ]
+ -- --=[ 432 payloads - 37 encoders - 8 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > db_status
[*] postgresql selected, no connection


Solution:-
Here is the solution to fix metasploit failed to connect to the database.
root@kali:~# /usr/bin/msfconsole
msf > msfdb init
[*] exec: msfdb init
msf > msfconsole
[*] exec: msfconsole
msf > db_status
[*] postgresql connected to msf
              [OR]
root@kali:~# /usr/bin/msfconsole start
msf > db_status
[*] postgresql connected to msf
I hope this information is useful for you. Please forgive any typos or incomplete sentences.
Share:

Contributors

Popular Posts