jueves, 23 de octubre de 2014

Instalando Webmin en Debian 7



Editamos el source list para agregar un nuevo repositorio:

root@Server:~# vi /etc/apt/sources.list
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib


Actualizamos para que tome el cambio el nuevo repositorio, pero nos indica que no está disponible la key pública:

root@Server:~# apt-get update
....
Reading package lists... Done
W: GPG error: http://webmin.mirror.somersettechsolutions.co.uk sarge Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D97A3AE911F63C51
W: GPG error: http://download.webmin.com sarge Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D97A3AE911F63C51
....


Vamos a la ruta donde queremos descargar la key:

root@Server:~# cd /root

root@Server:~# wget http://www.webmin.com/jcameron-key.asc
--2014-10-20 12:01:48--  http://www.webmin.com/jcameron-key.asc
Resolving www.webmin.com (www.webmin.com)... 216.34.181.97
Connecting to www.webmin.com (www.webmin.com)|216.34.181.97|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1320 (1.3K) [text/plain]
Saving to: `jcameron-key.asc'
100%[=======================================================================================================================================>] 1,320       --.-K/s   in 0s
2014-10-20 12:01:48 (71.9 MB/s) - `jcameron-key.asc' saved [1320/1320]


Agregamos la key:

root@Server:~# apt-key add jcameron-key.asc
OK


Esta vez si nos dejará actualizar:

root@Server:~# apt-get update
Get:1 http://ftp.ccc.uba.ar wheezy Release.gpg [1,655 B]
Get:2 http://ftp.ccc.uba.ar wheezy-updates Release.gpg [836 B]
Get:3 http://ftp.ccc.uba.ar wheezy Release [168 kB]
Get:4 http://ftp.ccc.uba.ar wheezy-updates Release [124 kB]
Get:5 http://ftp.ccc.uba.ar wheezy/main Sources [5,955 kB]
Get:6 http://download.webmin.com sarge Release.gpg [189 B]
Hit http://security.debian.org wheezy/updates Release.gpg
Get:7 http://webmin.mirror.somersettechsolutions.co.uk sarge Release.gpg [189 B]
Hit http://security.debian.org wheezy/updates Release
Hit http://webmin.mirror.somersettechsolutions.co.uk sarge Release
Hit http://download.webmin.com sarge Release
Hit http://webmin.mirror.somersettechsolutions.co.uk sarge/contrib amd64 Packages
Hit http://download.webmin.com sarge/contrib amd64 Packages
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://security.debian.org wheezy/updates/main Translation-en
Ign http://webmin.mirror.somersettechsolutions.co.uk sarge/contrib Translation-en_US
Ign http://webmin.mirror.somersettechsolutions.co.uk sarge/contrib Translation-en
Ign http://download.webmin.com sarge/contrib Translation-en_US
Ign http://download.webmin.com sarge/contrib Translation-en
Get:8 http://ftp.ccc.uba.ar wheezy/main amd64 Packages [5,841 kB]
Get:9 http://ftp.ccc.uba.ar wheezy/main Translation-en [3,846 kB]
Get:10 http://ftp.ccc.uba.ar wheezy-updates/main Sources [14 B]
Get:11 http://ftp.ccc.uba.ar wheezy-updates/main amd64 Packages/DiffIndex [1,609 B]
Get:12 http://ftp.ccc.uba.ar wheezy-updates/main Translation-en/DiffIndex [1,057 B]
Fetched 15.9 MB in 25s (620 kB/s)
Reading package lists... Done
root@Server:~#


Instalamos el webmin, le damos a 'Y' para confirmar:

root@Server:~# apt-get install webmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdbi-perl libodbc1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl
The following NEW packages will be installed:
  apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl webmin
0 upgraded, 5 newly installed, 0 to remove and 22 not upgraded.
Need to get 22.1 MB of archives.
After this operation, 141 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y

Get:1 http://ftp.ccc.uba.ar/pub/linux/debian/debian/ wheezy/main libauthen-pam-perl amd64 0.16-2+b2 [31.3 kB]
Get:2 http://ftp.ccc.uba.ar/pub/linux/debian/debian/ wheezy/main libio-pty-perl amd64 1:1.08-1+b2 [40.0 kB]
Get:3 http://ftp.ccc.uba.ar/pub/linux/debian/debian/ wheezy/main libapt-pkg-perl amd64 0.1.26+b1 [84.7 kB]
1% [Connecting to download.webmin.com]
Get:4 http://ftp.ccc.uba.ar/pub/linux/debian/debian/ wheezy/main apt-show-versions all 0.20 [34.9 kB]
Get:5 http://download.webmin.com/download/repository/ sarge/contrib webmin all 1.710 [21.9 MB]
Fetched 22.1 MB in 1min 16s (288 kB/s)
Selecting previously unselected package libauthen-pam-perl.
(Reading database ... 45191 files and directories currently installed.)
Unpacking libauthen-pam-perl (from .../libauthen-pam-perl_0.16-2+b2_amd64.deb) ...
Selecting previously unselected package libio-pty-perl.
Unpacking libio-pty-perl (from .../libio-pty-perl_1%3a1.08-1+b2_amd64.deb) ...
Selecting previously unselected package libapt-pkg-perl.
Unpacking libapt-pkg-perl (from .../libapt-pkg-perl_0.1.26+b1_amd64.deb) ...
Selecting previously unselected package apt-show-versions.
Unpacking apt-show-versions (from .../apt-show-versions_0.20_all.deb) ...
Selecting previously unselected package webmin.
Unpacking webmin (from .../archives/webmin_1.710_all.deb) ...
Processing triggers for man-db ...
Setting up libauthen-pam-perl (0.16-2+b2) ...
Setting up libio-pty-perl (1:1.08-1+b2) ...
Setting up libapt-pkg-perl (0.1.26+b1) ...
Setting up apt-show-versions (0.20) ...
** initializing cache. This may take a while **
Setting up webmin (1.710) ...
Webmin install complete. You can now login to https://Server:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.

miércoles, 22 de octubre de 2014

Script para copiar y verificar la copia de archivos con MD5 en Solaris

#!/bin/bash

echo "Verifico el tamaño del archivo local:"
VAR1=`du -sk /ruta/al/archivo`

echo "Copiando el archivo al servidor remoto:"
scp /ruta/al/archivo server:/ruta/remota/al/archivo

echo "Verifico el tamaño del archivo remoto:"
VAR2=`ssh server du -sk /ruta/remota/al/archivo`

echo "Verifico el md5 del archivo local:"
VAR3=`digest -v -a md5 /ruta/al/archivo | cut -d "=" -f2`

echo "Verifico el md5 del archivo remoto"
VAR4=`ssh server digest -v -a md5 /ruta/al/archivo | cut -d "=" -f2`

if [ "$VAR1" = "$VAR2" ];
then
 echo "Tamanos iguales."
else
 echo "Tamano incorrecto - Copia incorrecta !!"
fi

if [ "$VAR3" = "$VAR4" ];
then
 echo "Hashes iguales."
 echo "La copia ha finalizado correctamente."
else
 echo "Tamano incorrecto - Copia incorrecta !!"
fi

martes, 21 de octubre de 2014

UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

Al querer agregar un nuevo usuario me aparecía el siguiente mensaje:

UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).


Parece que alguien previamente editó el /etc/passwd y había inconsistencia el archivo passwd y el shadow.

Ejecutar el pwconf para actualizarlo:

# pwconv



martes, 14 de octubre de 2014

Administrator Password No Expires on VMware vCenter

Loguearnos al VCenter Server con el siguiente link, reemplazar ip ó el nombre del server:

https://VCenterServer:5480/


Ingresamos usuario y password del VCenter:



Vamos a la solapa de administración, tildamos la opción NO y luego submit:



Aparecerá en verde que fue satisfactoria como muestra la imagen:



Solaris 32 ó 64 bits?

server /# isainfo -kv
64-bit amd64 kernel modules

martes, 23 de septiembre de 2014

Resetear password de root del VCenter

Hoy no me podía loguear al Virtual Center de VMware (VCenter), llegué a la conclusión que el password había expirado.

Ingresé al VCenter con otro usuario ya que estaba en dominio, pero cuando reiniciaba la virtual donde esta instalado perdía conexión con la consola.

Los pasos a seguir son:

1) Conectarse por vSphere client al host donde está corriendo la maquina virtual del vcenter.



2) Conectarse por consola a la VM del Vcenter y reiniciarla desde la consola:

4) Cuando bootea ingresamos al grub, tecleamos la letra p para ingresar la password del grub. Por defecto es: vmware



5) Tocar e para editar la linea y al final agregamos lo siguiente: init=/bin/bash




6) Cambiar el password con el comando: # passwd root

7) Reiniciar la virtual con: # reboot

8) Probamos conectarnos con el vSphere Client al VCenter con el nuevo password de root.


miércoles, 17 de septiembre de 2014

Buscar WWN (World Wide Name) de una placa de fibra en Windows 2008

Inicio -> ejecutar -> mmc -> Ok


File -> Add/Remove Snap-in...


Storage Explorer -> Add -> Ok


Desplegamos el signo + de -> Storage Explorer -> Servers -> Nombre del Servidor -> sobre la placa y del panel derecho vemos el valor de la propiedad "Port WWN":