Posts

Showing posts from February, 2020

netstat command not found

This package contains the deprecated network utilities arp, ifconfig, netstat and route, which have been replaced by tools from the iproute2 package: * arp -> ip [-r] neigh * ifconfig -> ip a * netstat -> ss [-r] * route -> ip r yum install net-tools

domain not getting unsuspended in directadmin

just suspend manually and unsuspend it restart da and httpd

How to limit the number of emails sent by each user

How to limit the number of emails sent by each user (prevent spammer) Last Modified: Jul 25, 2013, 1:51 pm The  current exim.pl  files have the ability to track who is sending email.  There is an option to turn on a limit for how many emails are sent by a particular user.  To enable this limit, simply add the number of emails you'd likely to allow per day to the /etc/virtual/limit file. For most cases 200 emails should be enough for any users. Once the limit file has a number greater than 0, the exim.pl will start to count the number of emails sent by a user.  In the /etc/virtual/usage directory, there will be 2 types of files.   ' username ' and ' username .bytes'.  The bytes file will store how large each email was.  The total sum of the bytes in that files will give the amount of outgoing smtp bandwidth used that day (this is always enabled).   The other file ('username') is used to count the number of emails sent.  Each email sent will ad

backup

For backup, we have daily and weekly for weekly we mention --delete even for database both daily and weekly with ---delete will run the server whose backup needs to be set up there will be a script to create database dump backup daily  on backup_parent_dir="/mnt/sdd1/bacula/ then we rsync this folder to our backup server [root@sm254 ~]# crontab -l 13 01 * * * /bin/sh /home/sas/dbbackup_scripts.sh &> /home/sas/dbbackup_scripts.log [root@sm254 ~]# cat /home/sas/dbbackup_scripts.sh #!/bin/bash # Simple script to backup MySQL databases # Parent backup directory backup_parent_dir="/mnt/sdd1/bacula/" # MySQL settings mysql_user="root" mysql_password="a0ZcKSRDl6" # Read MySQL password from stdin if empty if [ -z "${mysql_password}" ]; then   echo -n "Enter MySQL ${mysql_user} password: "   read -s mysql_password   echo fi # Check MySQL password echo exit | mysql --user=${mysql_user} --password=${mysql_password} -B 2>/dev/null if

How to change update on Disk Quota?

bandwidth=1412.86 log_quota=0.000000 quota=86.4492 ~                      /usr/local/directadmin/data/users/zellebiote/domains Redhat: /sbin/quotaoff -a /sbin/quotacheck -avugmf /sbin/quotaon -a /usr/sbin/repquota / 358400 zellebiote +-  884648  358400  394240   none   32241     0     0    /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a; quota -v  username Disk quota error To clarify, DA is running the following to set the quotas on an account: Code: /usr/sbin/setquota [B]username[/B] 1024 1024 0 0 / so.. if you've edited the /usr/sbin/setquota binary, and made a wrapper, that could "hide" the error (if it exit's with 0), but does not necessarily mean the quotas are working. If you've only got a / partition, use this to see if it's working.. which is what DA calls: Code: /usr/sbin/repquota / which must display the standard quota output, for all Users.

email settings

Image
only for incoming, we can choose pop3 or IMAP Default IMAP ports: Here are the default ports that IMAP connection use: Port 143 – non-encrypted port Port 993 – SSL/TLS port, also known as IMAPS Default POP3 Ports: These are the ports that POP3 uses to establish a connection with an email server: Port 110 – non-encrypted port Port 995 – SSL/TLS port, also known as POP3S SMTP Server (Outgoing Messages) Secure (TLS) StartTLS    587 Secure (SSL) SSL     465 non ssl use 25 check your public IP and then update below line and use it in /home/sas/timepass.sh iptables -A INPUT -p tcp -s 59.90.55.116 -j ACCEPT iptables -A OUTPUT -p tcp -d 59.90.55.116 -j ACCEPT to cehck connection use bumkailashkumar@localhost:~$ telnet 192.227.84.98 143 Trying 192.227.84.98... Connected to 192.227.84.98. Escape character is '^]'. bumkailashkumar@localhost:~$ telnet 192.227.84.98 25 Trying 192.227.84.98... Connected to 192.227.84.98. Escape character is '^]'. Here are

nagios 32bit check_load or check_disk

check _load rpm package centos 6 i386 for check_load or check_disk inside /usr/lib/nagios/plugins

@ERROR: auth failed on module etc

@ERROR: auth failed on module etc chmod 600 /etc/rsync.secrets or chmod 600 /etc/rsyncd.secrets check file in  cat /etc/rsyncd.conf

@ERROR Invalid UID root

kill rsync on where it was not able to connect and then start with rsync --daemon

directadmin mysql password change

vi /usr/local/directadmin/conf/my.cnf cat /usr/local/directadmin/conf/mysql.conf /home/sas/dbbackup_scripts.sh

zimbra admin password reset

Resolution To reset the administrative password: su - zimbra zmprov sp <admin email address> <new password> Obtain a list of all Administrators If want to get a list of all administrators, run the next command: su - zimbra zmprov gaaa

unrouteable address

unrouteable address due to bandwidth overuse and domain suspend on mailing sever. or email id does not exist temporary bandwidth increase will still cause the issue if forwarder are set for mailing

run control(no route to host error)

rc  denotes "run-control", vi /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local echo 1 > /proc/sys/net/ipv4/tcp_syncookies ifconfig em1 115.112.176.43 netmask 255.255.255.192 route add default gw 115.112.176.1 /sbin/ifconfig em1:1 115.112.176.44 netmask 255.255.255.192 /sbin/ifconfig em1:2 115.112.176.45 netmask 255.255.255.192 /sbin/ifconfig em1:4 115.112.176.57 netmask 255.255.255.192 #/sbin/ifconfig em2 192.168.2.43 netmask 255.255.255.0 /sbin/ifconfig em1:5 115.112.176.23 netmask 255.255.255.192 /sbin/ifconfig em1:6 115.112.176.33 netmask 255.255.255.192 /sbin/ifconfig em1:7 115.112.176.51 netmask 255.255.255.192 /sbin/ifconfig em1:8 192.168.2.43 netmask 255.255.255.0 /bin/sh /home/sas/timepass.sh /usr/bin/rsync --daemon #/usr/bin/spamd -d -c -m 10 -4 /usr/l

ssh

ssh-keygen add public key to machine which you want to access cd /root/.ssh/authorized_keys

Install the Commodo SSL cert

Combine everything for nginx  [2] : Combine the above crt files into a bundle (the order matters, here): cat www_example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt Store the bundle wherever nginx expects to find it: mkdir -p /etc/nginx/ssl/example_com/ mv ssl-bundle.crt /etc/nginx/ssl/example_com/ Ensure your private key is somewhere nginx can read it, as well.: mv example_com.key /etc/nginx/ssl/example_com/ Make sure your nginx config points to the right cert file and to the private key you generated earlier: server { listen 443; ssl on; ssl_certificate /etc/nginx/ssl/example_com/ssl-bundle.crt; ssl_certificate_key /etc/nginx/ssl/example_com/example_com.key; # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ... } Restart nginx.

otrs logs

/opt/otrs/Kernel/Config Defaults.pm CODE:  SELECT ALL     $Self->{LogModule} = 'Kernel::System::Log::SysLog'; #    $Self->{'LogModule'} = 'Kernel::System::Log::File';     $Self->{'LogModule::SysLog::Facility'} = 'user';     $Self->{'LogModule::SysLog::LogSock'} = 'unix';     $Self->{'LogModule::LogFile'} = '/tmp/otrs.log'; #not relevant because SysLog, not File 

NRPE: Unable to read output

root@sm41 plugins]# /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda3 /usr/lib64/nagios/plugins/check_disk: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/nagios/plugins/check_disk) ----------------------------------------------------------------------------------------------------------- To know whether your system is  32 -bit or  64 -bit, type the command "uname -m" and press "Enter". This displays only the machine hardware name. It shows if your system is running  32 -bit (i686 or i386) or  64 -bit(x86_64). /usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda3 ---------------------------------------------------------------------------------------------------------- 1. Download the script:      https://gist.githubusercontent.com/harv/f86690fcad94f655906ee9e37c85b174/raw/2cfcc7922b0c2f391afb957fd209a1f1f2f9f659/glibc-2.17_centos6.sh 2. As 'root', run:     $ sh ./glibc-2.17_centos6.s

awstats icons

/home/shreetherm/domains/shreethermatech.com/awstats/.data awstats.shreethermatech.com.conf DirIcons="/icon" # DirData="/home/trimitic/domains/trimiti.com/awstats/.data" # Relative or absolute web URL of your awstats cgi-bin directory. # This parameter is used only when AWStats is run from command line # with -output option (to generate links in HTML reported page). # Example: "/awstats" # Default: "/cgi-bin"   (means awstats.pl is in "/yourwwwroot/cgi-bin") # DirCgi=/awstats" # Relative or absolute web URL of your awstats icon directory. # If you build static reports ("... -output > outputpath/output.html"), enter # path of icon directory relative to the output directory 'outputpath'. # Example: "/awstatsicons" # Example: "../icon" # Default: "/icon" (means you must copy icon directories in "/mywwwroot/icon") # DirIcons="icon"

JSON error wordpress

try_files $uri $uri/ /index.php?q=$uri&$args; add in nginx conf location part Was troubled with this error. It was also a nuisance having the index.php in the middle of the url. I tried all the published fixes without success, including the Cloudflare plugin. In the end, the fix was in the apache2.conf – changed AllowOveride to All for / and /var/www and restarted Apache. Then set permalinks to /%postname%/ and it all worked. Error message: The  response is not a valid JSON response .” is overwhelmingly seen in the new Block editor called Gutenberg. The easiest way to resolve the  updating  error is by disabling Gutenberg and switching back to the Classic editor. As they say, old is Gold. You can install the Classic Editor plugin for this. if getting error on widgets saving then  Classic Widgets add this plugin