Categories
General

Verifica domenii pe servere cPanel care nu mai sunt local


for user in $(whmapi1 listaccts | awk '/user:/ {print $2}'); do domain=$(whmapi1 accountsummary user=$user | awk '/domain:/ {print $2}'); assignedip=$(whmapi1 accountsummary user=$user | awk '/ip:/ {print$2}') ; dnsip=$(dig +short $domain); dnsmx=$(dig MX +short $domain @8.8.8.8 | awk '{print $2}' | xargs dig +short); if [[ $dnsip != $assignedip ]]; then echo -n "$user:$domain - A - FAILS"; if [[ "$dnsmx" == "$assignedip" ]]; then echo -e " but MX for $user:$domain does point locally"; else echo ""; fi; fi ; done

Categories
General

Stergere link-uri simbolice

Pentru a sterge toate link-urile simbolice(symlinks) din directorul curent:

find . -maxdepth 1 -type l -exec rm -f {} \;
Categories
General

ID container pentru top 10 procese openvz

ps -e h -o pid --sort -pcpu | head -10 | vzpid -

Va afisa id-ul procesului, id-ul containerului openvz si numele procesului.

Categories
General

umount device is busy

La umount pentru o partitie primim mesajul:

umount: /media/sda2: device is busy

Pentru a verifica ce anume foloseste partitia:

fuser -m /dev/sda2
/dev/sda2:          254308c

Verificam procesul cu pid-ul 254308

ps aux|grep 254308
mysql     254308  1.3  2.9 509928 120704

In cazul de fata e vorba de serviciul mysql.

Categories
General

Interogare reverse DNS cu dig

Pentru interogare rDNS pe langa comanda host se poate folosi dig
dig +noall +answer -x 8.8.8.8
8.8.8.8.in-addr.arpa. 43199 IN PTR google-public-dns-a.google.com.

Categories
General

Actualizare plesk din consola

/usr/local/psa/admin/sbin/autoinstaller
Categories
General

Apache – No space left on device: Cannot create SSLMutex

La pornirea apache apare urmatoarea eroare:

Apache - No space left on device: Cannot create SSLMutex

Solutia:

ipcs -s | grep apache | awk ' { print $2 } ' | xargs ipcrm sem

Si incercam din nou start la apache.

Varianta 2
Adaugam in /etc/sysctl.conf linia

„kernel.sem = 512 32000 100 512”

si rulam

sysctl -p; service httpd start

Categories
General

Kill la toate procesele unui utilizator

Putem da kill la toate procesele unui utilizator cu

kill -9 `ps -u utilizator -o "pid="`
Categories
General

Vulnerabilitate SolusVM

Comunicat SolusLabs:

It has been brought to our attention that a security vulnerability has been found in the Client, Reseller and Admin areas of SolusVM. Even though the chances of this vulnerability being used against a SolusVM installation is low, we have released version 1.7.02 as a Critical security release and advise you to upgrade immediately.

Categories
General

Vulnerabilitate ProFTPD

Am primit o notificare de la Parallels referitor la o vulnerabilitate ProFTPD, fiind afectate produsele Plesk 9 si Plesk 10. Noi am actualizat ProFTPD pe serverele cu plesk prin Atomic Rocket Turtle

Comunicatul integral:

ProFTPD Remote Code Execution Vulnerability and Exploit

A flaw in the popular ProFTPD FTP server potentially allows unauthenticated attackers to compromise a server. The problem is caused by a buffer overflow in the pr_netio_telnet_gets() function for evaluating TELNET IAC sequences.

ProFTPD bug report: http://bugs.proftpd.org/show_bug.cgi?id=3521

Parallels Plesk Panel 9.x, 9.5x and 10 include this vulnerability. Parallels will issue Micro Updates (hotfixes) for 9.5.2 and 9.5.3 no later than 12:00 GMT (noon) on Thursday November 11, (7:00am EST in the US) to fix this. The patch for Parallels Plesk Panel 10.01 will be released at 17:00 GMT on Thursday November 11, (12:00pm EST in the US). Patches for Plesk 9.0, 9.22, and 9.3 will be posted by 12 noon GMT on Friday November 12, (7am EST in the US). Parallels updates on this will be coming soon.

MORE INFORMATION:

Updating to ProFTPD version 1.3.3c or disabling FTP services is the only current solution to this vulnerability.

ProFTPD is capable of processing TELNET IAC sequences on port 21; the sequences enable or disable certain options not supported by the Telnet or FTP protocol itself. The buffer overflow allows attackers to write arbitrary code to the application’s stack and launch it. Updating to version 1.3.3c of ProFTPD solves the problem.

The update also fixes a directory traversal vulnerability which can only be exploited if the “mod_site_misc” module is loaded. This flaw could allow attackers with write privileges to leave their permitted path and delete directories or create symbolic links outside of the path. The module is not loaded or compiled by default.

A remote root exploit is available: [Full-disclosure]ProFTPD IAC Remote Root Exploit

A Proftpd update for Plesk has been provided by Atomic Rocket Turtle. To apply the update, execute the commands below.

# w get -O - http://www.atomicorp.com/installers/atomic |sh
# yum upgrade psa-proftpd