• Búsqueda

Desde Plesk 10.2 la pass de admin se puede recuperar con el siguiente comando en Linux:

# /usr/local/psa/bin/admin –show-password

En anteriores versiones, el comando era:

# cat /etc/psa/.psa.shadow

En Windows sigue siendo con el comando:

“%plesk_bin%\plesksrvclient” -get

Comments No Hay Comentarios »

Tras actualizar Plesk 9 a Plesk 10, los usuarios de ftp se quedan sin acceso a su home. Si se crean nuevos estos pueden acceder sin problemas.

El error es:

530 User xxx cannot log in, home directory inaccessible.

Para solucionarlo en un dominio:

%plesk_bin%\ftpmng.exe –remove-vhost –vhost-name=dominio.com

%plesk_bin%\ftpmng.exe –reconfigure-vhost –vhost-name=dominio.com

Pero si tenemos que resolverlo en todos los dominios y tenemos muchos la cosa se complica para hacerlo uno a uno, afortunadamente podemos pasarle un listado con todos los dominios:

1- Sacar el listado:

mysql -uadmin -pcontraseña -P8306 -e “use psa; select name from domains;” > c:\dominios.txt

2- Luego:

%plesk_bin%\ftpmng.exe –remove-all

%plesk_bin%\ftpmng.exe –reconfigure-vhosts –vhost-names=c:\dominios.txt –via-file

 

Comments 2 Comentarios »

Por defecto Windows crea un fichero de paginación de memoria (pagefile.sys) tan grande como la memoria que tengamos, siendo además gestionado por el sistema para poder crecer si es necesario.

En muchos manuales se aconseja establecer un valor fijo equivalente a 1,5 veces la memoria física. En cambio cuando se manejan equipos con mucha memoria esto puede suponer desaprovechar los recursos de forma innecesaria. Por ejemplo, en nodos de Hyper-V donde el sistema no necesita un archivo de paginación enorme.

Para hacerse a la idea de la situación, una instalación limpia de Windows 2008 Server sobre un equipo con 48 GB de Ram y discos SAS en Raid 5. Consume 56 GB de espacio, tratándose además de en un almacenamiento bastante caro, no conviene desaprovechar espacio.

Si mostramos los archivos ocultos, podemos ver que el culpable es el archivo pagefile.sys

Para reducirlo vamos a las propiedades de memoria virtual y establecemos unos valores personalizados. Aunque cada maestrillo tiene su librillo, yo suelo optar por un valor fijo y no administrado automáticamente para evitar consumos innecesarios. De todas formas, no os olvidéis de monitorizarlo para ajustarlo según las necesidades (es decir, comprar más RAM si el server empieza a paginar).

Si preferís hacerlo más rápido desde shell:

 

wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name=”c:\\pagefile.sys” set InitialSize=4000,MaximumSize=4000

 

Comments 3 Comentarios »

He reproducido el siguiente error en Windows x64 con Plesk 9.5

PROBLEMA:

Al intentar marcar un mensaje como SPAM dentro de las herramientas de seguimiento de Plesk, se produce este error:

Error: Cannot exec ‘spammng –train-spam –filename=C:/Program Files (x86)/Parallels/Plesk/tmp/spmA94D.tmp –password=**** –mailname=****’:
Learned tokens from 0 message(s) (1 message(s) examined)
—–
Use of uninitialized value in concatenation (.) or string at C:/Program Files (x86)/Parallels/Plesk/Additional/Perl/lib/File/Spec/Win32.pm line 275.
util: refusing to untaint suspicious path: “C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\****\bayes”
util: refusing to untaint suspicious path: “C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\****\bayes_journal”
bayes: expire_old_tokens: Insecure dependency in sysopen while running with -T switch at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Locker/Win32.pm line 71.
plugin: eval failed: bayes: (in learn) Insecure dependency in sysopen while running with -T switch at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Locker/Win32.pm line 71.
ERROR: the Bayes learn function returned an error, please re-run with -D for more information at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\bin\sa-learn line 490.
Unable to train spamassasin: Learned tokens from 0 message(s) (1 message(s) examined)
—–
Use of uninitialized value in concatenation (.) or string at C:/Program Files (x86)/Parallels/Plesk/Additional/Perl/lib/File/Spec/Win32.pm line 275.
util: refusing to untaint suspicious path: “C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\****\bayes”
util: refusing to untaint suspicious path: “C:\Program Files (x86)\Parallels\Plesk\Additional\SpamAssassin\SpamFilterUserConfigsPath\****\bayes_journal”
bayes: expire_old_tokens: Insecure dependency in sysopen while running with -T switch at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Locker/Win32.pm line 71.
plugin: eval failed: bayes: (in learn) Insecure dependency in sysopen while running with -T switch at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\lib/Mail/SpamAssassin/Locker/Win32.pm line 71.
ERROR: the Bayes learn function returned an error, please re-run with -D for more information at C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\bin\sa-learn line 490.

SOLUCION:

Ve a las propiedades de C:\Program Files (x86)\Parallels\Plesk\Additional\Perl\site\lib\Mail\SpamAssassin\Util.pm y desmarca la de solo lectura. Luego edita el archivo y cambia la siguiente línea:

my $chars = ‘-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:’;

Por:

my $chars = ‘-_A-Za-z\xA0-\xFF0-9\.\%\@\=\+\,\/\\\:\(\)’;

Comments No Hay Comentarios »

Hay que ejecutar GPMC.MSC y editar Default Domain Policy. Luego moverse dentro de Configuración de equipo > Directivas > Configuración de Windows > Configuración de seguridad > Directivas de cuenta > Directiva de contraseñas y deshabilitar la opción La contraseña debe cumplir los requisitos de complejidad.

Con esto desactivamos la directiva para todo el dominio.

Comments No Hay Comentarios »

El problema lo he reproducido al actualizar W2008 R2 con KB2489256, que incluye cambios en FTP 7.5 con la autenticación y los login dejan de funcionar. Lo peor de todo es que aunque se desinstalen los updates el problema persiste y no he encontrado foro de Plesk o Windows que arroje luz sobre el tema. Así que lo pongo aquí por si a alguien más le sucede.

ERROR:

El ftp responde, pero tras pasarle el user/pass da el error:

530 User cannot log in.

Login failed.

SOLUCIÓN:

La solución es bastante sencilla una vez sabemos lo que es. Simplemente hay que ir a la opción de autenticación por FTP, habilitar la autenticación anónima (que la deshabilita) y lo más importante es quitar la barra “/” que aparece como dominio predeterminado.

Comments 1 Comentario »

Este es un error que se lleva arrastrando desde varias releases, pego la solución para que nadie pierda el tiempo hasta que se solucione.

El error es algo así:

The INSTALLSHAREDWOWDIR command line value is not valid. Please ensure the specified path is valid and different than the INSTALLSHAREDDIR path.

El problema es que por mucho que cambies la ruta en el instalador no hará caso y seguirá dando error, la solución es lanzar el instalador indicándole esos parámetros, en mi caso:

C:\Users\Administrador\Downloads>es_sql_server_2008_r2_express_with_management_tools_x64.exe /action=Install /INSTALLSHAREDWOWDIR=”C:\Program Files (x86)\Microsoft SQL Server (x86)” /INSTALLSHAREDDIR=”C:\Program Files\Microsoft SQL Server”

Simplemente con eso se soluciona el problema, sencillo pero a mí me ha hecho perder unas horas :(

Comments No Hay Comentarios »

Mi sistema operativo por defecto es Windows 2008 server R2. El motivo principal es que con él puedo hacer todo tipo de pruebas antes de llevarlas a un entorno real.

Por razones obvias un SO de servidor no tiene las mismas aplicaciones (p.ej. Reproductor Windows Media), ni el mismo aspecto de una versión de usuario. Afortunadamente con Windows 2008 podemos habilitar muchas de ellas, para que se parezca a Windows 7.

     1. Administrador del servidor > Características > Agregar características > Experiencia de escritorio.

Tendrás que reiniciar el equipo después de instalar.

     2. Abrir Servicios > Temas >  Propiedades de Temas > Seleccionar Tipo de Inicio: Automático.

     3. Para finalizar vamos a Panel de control > Apariencia y personalización > Cambiar de tema y elegimos Windows 7.

Comments No Hay Comentarios »

Un poquito de SPAM rapidito, para comentar a todos que podéis encontrar más posts míos en el blog de mi empresa. blackslot.com.

Os espero también por allí ;) .

Comments No Hay Comentarios »

Hago un C&P completo de un post de Mundonix, que me ha pasado un compi y no quiero perder ;)
About Nagios (http://www.nagios.org)
Nagios is a host and service monitor designed to inform you of network problems before your clients, end-users or managers do. It has been designed to run under the Linux operating system, but works fine under most *NIX variants as well. The monitoring daemon runs intermittent checks on hosts and services you specify using external “plugins” which return status information to Nagios. When problems are encountered, the daemon can send notifications out to administrative contacts in a variety of different ways (email, instant message, SMS, etc.). Current status information, historical logs, and reports can all be accessed via a web browser.
About Centreon (http://www.centreon.com)
Centreon is a network, system, applicative supervision and monitoring tool, it is based upon the most effective Open Source monitoring engine: Nagios. Centreon provides a new frontend and new functionalities to Nagios.
Prerequisites that not covered in this guide:
- You will need some knowledge of basic Linux administration, in case you will need to do troubleshooting.
- You will need to be familiar with Nagios architecture, and know how to solve errors that comes from nagios config validation.
- You will need an MTA daemon installed & configured, so nagios will able to send notifications, good examples are sendmail, postfix, exim.
Notes before we begin:
- This guide is intended for Debian/Ubuntu based distributions. It was tested on Debian 5.0 64-bit, and Ubuntu 8.10/9.04 Server 64-bit
- Centreon version 2.1.x is required for this gude to work, version 2.0.x of Centreon won’t work with this article.
- It’s recommended to use a clean install of Debian/Ubuntu.
- All commands in this article must be run as root user, in Ubuntu you can become a root user by using command “sudo -s”.
Install required Ubuntu/Debian packages:
Debian only:
# apt-get install sudo lsb-release
dos2unix, Converts DOS <-> Unix text files, alias tofromdos:
# apt-get install tofrodos
MTA (exim by default) and mail utilities:
# apt-get install mailx
Apache web server and PHP5:
# apt-get install apache2 php5 php-pear php5-mysql php5-ldap php5-snmp php5-gd
MySQL-Server:
# apt-get install mysql-server-5.0
You will be asked to specify a new password for the MySQL “root” user. Remember it, we will use it later.

RRDTool:
# apt-get install rrdtool librrds-perl
Required Perl modules:
# apt-get install libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libdigest-sha1-perl libgd-gd2-perl
SNMP daemon:
# apt-get install snmp snmpd libnet-snmp-perl libsnmp-perl
Install Nagios 3 and NDOutils for MySQL:
Type:
# apt-get install nagios3 nagios-nrpe-plugin ndoutils-nagios3-mysql
When asked for “Configure database for ndoutils-mysql with dbconfig-common?”, answer NO, Centreon installation script will deal with it.
Now let’s move/backup the original Nagios configuration directory, as Centreon will use its own structure for Nagios configuration files:
# mv /etc/nagios3 /etc/nagios3.orig
# mkdir /etc/nagios3
# cp -Rt /etc/nagios3 /etc/nagios3.orig/nagios.cfg /etc/nagios3.orig/apache2.conf /etc/nagios3.orig/stylesheets/
# chown nagios:www-data /etc/nagios3
# chmod ug+w /etc/nagios3
Install optional packages (not required):
OpenSSH server (Every linux server must have it!):
# apt-get install ssh
PHPMyAdmin – web based Mysql console:
# apt-get install phpmyadmin
Install Centreon:
Note: Before beginning the installation make sure you have an internet connection!
Now download the latest Centreon distribution (by the time of writing latest version was 2.1.1):
# cd; wget http://download.centreon.com/centreon/centreon-2.1.1.tar.gz
Centreon installation script will update PEAR modules (if required). If you are behind proxy, use following command for PEAR proxy configuration:
# pear config-set http_proxy http://<my_proxy>:<port>/
Replace “<my_proxy>” with to your proxy address and “<port>” with your proxy port.
Next, type following commands (remember to replace the names to Centreon version you use):
# tar xzf centreon-2.1.1.tar.gz
# cd centreon-2.1.1
# ./install.sh -i
Let’s follow the installation script questions:
Press “Enter” to read the Centreon License, then type “y” to accept it.
Do you want to install : Centreon Web Front
[y/n], default to [n]: y
Do you want to install : Centreon CentCore
[y/n], default to [n]: y
Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]: y
Do you want to install : Centreon Snmp Traps process
[y/n], default to [n]: y
Where is your Centreon directory?
default to [/usr/local/centreon]: /usr/local/centreon
Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]: y
Where is your Centreon log directory
default to [/usr/local/centreon/log]: /usr/local/centreon/log
Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]: y
Where is your Centreon etc directory
default to [/etc/centreon]: /etc/centreon
Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]: y
Where is your Centreon generation_files directory?
default to [/usr/local/centreon]: /usr/local/centreon
Where is your Centreon variable library directory?
default to [/var/lib/centreon]: /var/lib/centreon
Do you want me to create this directory ? [/var/lib/centreon]
[y/n], default to [n]: y
Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]: /usr/local/centreon/bin
Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]: y
Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]: /usr/lib/perl5/RRDs.pm
Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]: /usr/share/php/PEAR.php
Where is installed Nagios ?
default to [/usr/local/nagios]: /usr/lib/cgi-bin/nagios3
Where is your nagios config directory
default to [/usr/local/nagios/etc]: /etc/nagios3
Where is your Nagios var directory ?
default to [/usr/local/nagios/var]: /var/lib/nagios3
Where is your Nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec]: /usr/lib/nagios/plugins
Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]: /usr/share/nagios/htdocs/images/logos
Where is your NDO ndomod binary ?
default to [/usr/sbin/ndomod.o]: /usr/lib/ndoutils/ndomod-mysql-3x.o
Where is sudo configuration file
default to [/etc/sudoers]: /etc/sudoers
Do you want me to configure your sudo ? (WARNING)
[y/n], default to [n]: y
Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]: y
Do you want to reload your Apache ?
[y/n], default to [n]: y
Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]: y
Where is your Centreon Run Dir directory?
default to [/var/run/centreon]: /var/run/centreon
Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]: y
Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]: /usr/local/centreon/bin
Where is your CentStorage RRD directory
default to [/var/lib/centreon]: /var/lib/centreon
Do you want me to install CentStorage init script ?
[y/n], default to [n]: y
Do you want me to install CentStorage run level ?
[y/n], default to [n]: y
Where is your CentCore binary directory
default to [/usr/local/centreon/bin]: /usr/local/centreon/bin
Do you want me to install CentCore init script ?
[y/n], default to [n]: y
Do you want me to install CentCore run level ?
[y/n], default to [n]: y
Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]: /var/lib/centreon/centplugins
Do you want me to create this directory ? [/var/lib/centreon/centplugins]
[y/n], default to [n]: y
Where is your SNMP configuration directory
default to [/etc/snmp]: /etc/snmp
Where is your SNMPTT binaries directory
default to [/usr/local/centreon/bin/]: /usr/local/centreon/bin/
Continue the installation with the Centreon Web interface:
Open in web browser: “http://<yourserverip>/centreon/” replace “<yourserverip>” with your Centreon server ip address or hostname.
Follow Centreon Setup instructions:
- Press Start
- Check “I Accept” and press Next
- Make sure that selected “Nagios Version” is “3.x”, then press Next
- On next screen, make sure that all components status is “OK”, then press Next
- If all components are “OK”, then press Next again
- Fill required DB info as follows, then press Next
· Root Password for MySQL: [MySQL root password which you entered during MySQL installation]
· Centreon Database Name: centreon
· Centreon Data Storage Database Name: centstorage
· Database Password: centreon
· Confirm it: centreon
· MySQL Client version (Password Haching Changes): >=4.1 – PASSWORD()
- Press Next in the screen of DataBase Verification
- Fill required Admin user info, then press next (make sure that a username is Admin)
- Check “No” in “LDAP Authentication” screen, then press Next
- Press Next again
- Press Next in “Creating Database” screen
- Press on “Click here to complete your install”
NDOUtils configuration (from command line):
In Centreon version 2.1 and newer, NDO database is configured as part of the Centreon installation. We don’t need to configure manually. We only need to enable NDO, in “/usr/default/ndoutils”.
Edit the “/usr/default/ndoutils” by typing:
# vi /etc/default/ndoutils
Change “ENABLE_NDOUTILS=0″ to “ENABLE_NDOUTILS=1″
Finalize Centreon configuration:
Open in webrowser: “http://<yourserverip>/centreon/”, replace “<yourserverip>” with your Centreon server ip address or hostname.
Go to: Configuration -> Nagios -> cgi (in sidebar), Press on “CGI.cfg” link
Change settings to some options, as writed below:
- Physical HTML Path: /usr/share/nagios3/htdocs
- URL HTML Path     : /nagios3
- Nagios Process Check Command: /usr/lib/nagios/plugins/check_nagios /var/cache/nagios3/status.dat 5 ‘/usr/sbin/nagios3′
Press Save
Go to: Configuration -> Nagios -> nagios.cfg (in sidebar), Press on “Nagios CFG 1″ link, you should be in “Files” section of the configuration screen.
Make sure to set folowing configuration values:
- Log File              : /var/log/nagios3/nagios.log
- Downtime File         : /var/lib/nagios3/downtime.dat
- Comment File          : /var/lib/nagios3/comment.dat
- Temp File             : /var/cache/nagios3/nagios.tmp
- P1 File               : /usr/lib/nagios3/p1.pl
- Lock File             : /var/run/nagios3/nagios3.pid
- Object Cache File     : /var/cache/nagios3/objects.cache
- Status File           : /var/cache/nagios3/status.dat
- External Command File : /var/lib/nagios3/rw/nagios.cmd
Now Press on “Logs Options” tab to go to “Logs Options” section.
Make sure to set folowing configuration values:
- Log Archive Path     : /var/log/nagios3/archives/
- State Retention File : /var/lib/nagios3/retention.dat
Press Save
Go to: Administration -> Options -> CentStorage (in sidebar)
Make sure to set folowing configuration values:
- Nagios current log file to parse: /var/log/nagios3/nagios.log
Press Save
Now let’s apply our changes, go to: Configuration -> Nagios
Select as below:
- Generate Configuration Files
- Include Comments
- Run Nagios debug (-v)
- Move Export Files
- Restart Nagios
- Method: “External Command”
Press Export
This will restart Nagios & apply all changes you made in Web Interface.
You will do it every time you make changes, e.g. adding/modifying of hosts, commands, contacts, services…etc…
The installation of Centreon is completed.
Final fixes (very important):
Go to terminal console, then…
In Debian/Ubuntu the user “nagios” is set to “/bin/false” shell. Because of it “centcore” and “centstorage” daemons won’t start. A reason for that is because those daemons use “su -c” command which requires a real shell, so the shell for “nagios” user must be set to “/bin/sh”:
# usermod -s /bin/sh nagios
Apply permissions for Web interface to be able to send “External Commands”, perform the following commands to change directory permissions and to make the changes permanent:
# invoke-rc.d nagios3 stop
# dpkg-statoverride –update –add nagios www-data 2710 /var/lib/nagios3/rw
# dpkg-statoverride –update –add nagios nagios 751 /var/lib/nagios3
Add htaccess user with password “P@ssw0rd” for nagios CGI:
# htpasswd -bc /etc/nagios3/htpasswd.users nagiosadmin P@ssw0rd
Allow SNMP readonly access:
# echo “rocommunity public” > /etc/snmp/snmpd.conf
If you want to allow SNMP access only for localhost then use this instead:
# echo “rocommunity public 127.0.0.1″ > /etc/snmp/snmpd.conf
Now, restart the server
# sync;sync;init 6
That’s it, after reboot, you will have a fully functional Nagios & Centreon environment.
Feel free to add comments/suggestions.

Comments 1 Comentario »