Translate

Thursday 14 August 2014

ant taskdef class org.apache.catalina.ant.installtask cannot be found

While using Apache Ant with Apache Tomcat  with if this error appears

ant taskdef class org.apache.catalina.ant.installtask cannot be found

Solution:
If you are using tomcat version 7 then add this to your build.xml file.
<taskdef name="install" classname="org.apache.catalina.ant.DeployTask">
 
instead of 
 
<taskdef name="install" classname="org.apache.catalina.ant.InstallTask">
 


Thursday 7 August 2014

Maven org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved

Solution :

1)Set your proxy settings if any. Set proxy property in Setting.xml in maven Folder. link
2)run mvn --version to check if all paths are correct
3)create new mvn project using command line and build it. if build is successful then is may be cache problem. Delete all folders form .m2 local repository folder and recreate project and let it download all dependencies again. To create new project visit link. To compile run mvn compile in project folder.

Wednesday 25 June 2014

Setting up Squirrelmail with postfix and devcoot: errors: Authentication not enabled && Relay Access Denied

****************************************************************

issue 1
ERROR:
Message not send Server Replied
Transaction Failed
554.5.7.1 <email>: Relay Access Denied

Solution :
Check hostname of system by command
hostname
vim /etc/postfix/main.cf
check hostname in main.cf file it must be identical as hostname 
Check hostname in /etc/hosts

*********************************************************************

issue2
ERROR:
Message not send Server Replied
Temporary authentication failure
454 4.7.1<mail>:Relay access denied

solution:
change smtp_auth to none if it is login in
vim /etc/squirrelmail/config.php


*********************************************************************


issue3
ERROR:
Message not send Server Replied
Bad sequence of commands
503 5.5.1<mail>:Authentication not enabled 

solution:
change smtp_auth_mech to none if it is login in
vim /etc/squirrelmail/config.php


************************************************************************

issue4
ERROR: NIS lookup not set. NIS lookup disabled
it appears in maillog

Solution :
vim /etc/squirrelmail/main.cf
line number 382
uncomment
alias_maps = hash:/etc/aliases

*************************************************************************

Friday 6 June 2014

vt-x is not available. (verr_vmx_no_vmx)

You might see this error when some day you run Virtual Box

vt-x is not available. (verr_vmx_no_vmx)

This error is due to occupied VT-X resource by some other program , process or service. Most common reason of this is due to Hyper-V on Windows. You can stop hyper-V services form component services or for permanent solution disable service or UNCHECK it from turn windows program on or off.




Restart. VirtualBox should be fine.

Tuesday 25 March 2014

Restrict Root Access to server



Adding user with root privileges
sudo useradd -m testuser
sudo passwd testuser
sudo usermod -s /bin/bash testuser

Restart ssh
/etc/init.d/ssh restart

Check your access can ssh but not able to have root access
Open the file sudoers  
vim /etc/sudoers

Add the following lines below the root line in the file
testuser ALL=(ALL:ALL) ALL
write quite

Service ssh restart
/etc/init.d/ssh restart

Check again for root access. Got access.

Changing ssh port. Edit sshd_config file
vim /etc/ssh/sshd_confing
Port 22
change it to desired one

wq

service ssh restart

Check again with new port

ssh -p 220 testuser@SERVER_IP

Successfully logged in.

Restricting root user from direct login.
Edit sshd_config and add

PermitRootLogin no

and comment PermitRootLogin yes

service ssh restart



Now adding sftp users

create backup of sshd_config
Create new users with home directories
Create their passwords
Add it to group


FreeRadius PAP Authentication Issue : WARNING: Unprintable characters in the password. Double-check the shared secret on the server and the NAS! Using Post-Auth-Type Reject ().[pap] Passwords don't match

If you are seeing this in radius log

WARNING: Unprintable characters in the password.  Double-check the shared secret on the server and the NAS! Using Post-Auth-Type Reject ([pap] Passwords don't match).

 [pap] login attempt with password "5?q¦¦?!##+Y?E¦¦"
[pap] Using clear text password "mypassword"

Do nothing until this warning is disappeared. To troubleshoot this use following

1) Match your key as described in warning .(NAS shared secret and shared secret on other Service like VPN in my case )

2) If keys are same and still FreeRadius is NOT Authenticating then change your secret to some simple secret like ("mysecret"). This may be due to too long shared secret or data type conversion mismatch between your Radius server and Service Shared Secret.

NOTE: You have to change shared secret on three locations.

1) Radcheck database table in Radius Server
2) /etc/raddb/clients.conf (In case of CentOS)
3) /etc/openvpn/radiusplugin.cnf

This will solve your issue. For more understanding you can see Defining Shared Secret on official documentation of Radius Server. link


Wednesday 22 January 2014

Install open VPN , PPTP and L2tp Client network manager ubuntu

apt-get install network-manager-openvpn
sudo apt-add-repository ppa:seriy-
pr/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp-gnome

http://forum.openvz.org/index.php?t=msg&goto=49760&
I've found that xt_tcpudp module seem to be included in the kernel packages of Debian 6, but not of CentOS 6. I don't know if it can be installed with some additional package (yum).


http://forum.openvz.org/index.php?t=msg&goto=8117
Hi,

iptables "MASQUERADE" isn't virtualized,
only listed iptables modules can be used in VE context:
(see man-page of vzctl)

iptable_filter,iptable_mangle, ipt_limit, ipt_multiport,
ipt_tos, ipt_TOS,ipt_REJECT, ipt_TCPMSS, ipt_tcpmss,
ipt_ttl, ipt_LOG, ipt_length, ip_conntrack, ip_conntrack_ftp,
ip_conntrack_irc, ipt_conntrack, ipt_state, ipt_helper,
iptable_nat, ip_nat_ftp, ip_nat_irc, ipt_REDIRECT xt_mac.
 



iptables -t nat -A POSTROUTING -j SNAT --to-source <venet's IP>
 
 
 http://sourceforge.net/p/ipsec-tools/bugs/70/
modprobe af_key 


http://superuser.com/questions/570612/how-do-i-get-l2tp-to-successfully-install-on-centos-5-9
http://lowendtalk.com/discussion/11171/implement-of-l2tp-in-an-openvz-container 


ifconfig.me
execute command without saving in history .
space and command