# /etc/init.d/mysqld stop
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password=PASSWORD("your password here") WHERE User="root";
mysql> exit
# /etc/init.d/mysqld stop
# /etc/init.d/mysqld start
Wednesday, September 25, 2013
Friday, September 6, 2013
Cisco switch port in err disabled , how to recover
go to the specific port configuration mode.
disable port security , disable and enable
acc-sw-2960-48p-svr-(config-if)#no switchport port-security
acc-sw-2960-48p-svr-(config-if)#shutdown
acc-sw-2960-48p-svr-(config-if)#no shutdown
disable port security , disable and enable
show port 0/19 will show state
Port Name Status Vlan Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
0/19 errdisable 1 normal auto auto 10/100BaseTX
acc-sw-2960-48p-svr-(config-if)#no switchport port-security
acc-sw-2960-48p-svr-(config-if)#shutdown
acc-sw-2960-48p-svr-(config-if)#no shutdown
Monday, July 29, 2013
Tuesday, July 23, 2013
Sunday, June 16, 2013
Fix yum error CentOS linux : Error: file is encrypted or is not a database
Error: file is encrypted or is not a database
[sameera@gemini test2]$ sudo yum clean
Loaded plugins: fastestmirror, refresh-packagekit, security
Error: clean requires an option: headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all
[sameera@gemini test2]$ sudo yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras linuxtech-release rpmforge updates
Cleaning up Everything
[sameera@gemini test2]$ sudo yum clean
Loaded plugins: fastestmirror, refresh-packagekit, security
Error: clean requires an option: headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all
[sameera@gemini test2]$ sudo yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras linuxtech-release rpmforge updates
Cleaning up Everything
Tuesday, April 16, 2013
PPTP VPN server Linux
Step 1. Install PPTPD
If your OS is CentOS/RedHat 5:
Step 6. Configure firewall
If you are using CSF firewall, you may refer to this post on firewall settings.
Step 7. Start PPTP VPN server
If your OS is CentOS or Redhat, using the following command:
If your OS is Ubuntu, you just reboot your machine.
Now you can test the VPN server from any client: Windows PCs, Linux PCs, Android phones/tablets, or iPhone and iPad.
The log of the VPN server, by default, is combined with system log located at /var/log/messages.
If your OS is CentOS/RedHat 5:
If your OS is CentOS/RedHat 6:yum install ppp
cd /usr/local/src
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.x86_64.rpm
rpm -Uhv pptpd-1.3.4-2.rhel5.x86_64.rpm
If you are using Ubuntu:yum install ppp
cd /usr/local/src
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm
rpm -Uhv pptpd-1.3.4-2.el6.x86_64.rpm
apt-get install pptpd
Step 2. Edit IP setttings in /etc/pptpd.confvi /etc/pptpd.conf
localip 192.168.0.1Step 3. Add user account in/etc/ppp/chap-secrets (assign username and password)
remoteip 192.168.0.101-200
vi /etc/ppp/chap-secrets
usernameForuser1 * setpassword1here *Step 4. Optional settings in /etc/ppp/options.pptpd
usernameForuser2 * setpassword2here *
vi /etc/ppp/options.pptpd
ms-dns 8.8.8.8Step 5. Enable network forwarding in /etc/sysctl.conf
ms-dns 4.4.4.4
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1use the following command to apply the change:
sysctl -p
Step 6. Configure firewall
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
service iptables save
service iptables restart
If you are using CSF firewall, you may refer to this post on firewall settings.
Step 7. Start PPTP VPN server
If your OS is CentOS or Redhat, using the following command:
service pptpd restart
To start PPTP Daemon automatically when rebooting next time, use command:
chkconfig pptpd on
If your OS is Ubuntu, you just reboot your machine.
Now you can test the VPN server from any client: Windows PCs, Linux PCs, Android phones/tablets, or iPhone and iPad.
The log of the VPN server, by default, is combined with system log located at /var/log/messages.
Wednesday, February 6, 2013
How to recover cisco switch port from err-disable state
Port is in err-disable state? And you don't know what to do?
switch01#show int G1/0/19 GigabitEthernet1/0/19 is down, line protocol is down (err-disabled)
Find out the main reason for err-disable state. In our case it is port security violation on port Gi1/0/19.
#show interfaces status err-disabled Port Name Status Reason Gi1/0/19 SERVER01 err-disabled psecure-violation Gi1/0/46 err-disabled psecure-violation Gi2/0/12 err-disabled psecure-violationFix port configuration:
int G1/0/19 no switchport port-security shut no shut
Wednesday, January 30, 2013
activate windows 7 command line
- Open up an elevated command prompt.
- Enter the following
slmgr -ipk your-mak-key-here slmgr -ato
Subscribe to:
Posts (Atom)