miércoles, 13 de octubre de 2010

Configurar usuario y contraseña Cisco







CONSOLA
Acceso por Hyperterminal

Configurar conexión Consola con contraseña:
Switch#enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line console 0
Switch(config-line)#password 123456789
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]

Configurar conexión Consola con usuario y contraseña:
Switch#enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line console 0
Switch(config-line)#login local
Switch(config-line)#exit
Switch(config)#username test2 password 2121
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]

VTY
Acceso por Telnet.

Configurar conexiones VTY sin encriptar y sin nombre de usuario:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line vty 0 15
Switch(config-line)#password abcdefghi
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write memBuilding configuration...
[OK]

Configurar conexiones VTY con nombre de usuario y contraseña:
Password:
Switch>enable
Password:
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#username test3 password 456789
Switch(config)#line vty 0 15
Switch(config-line)#password test3
Switch(config-line)#login local
Switch(config-line)#exit
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]


Configurar conexiones VTY con nombre de usuario y contraseña cifrada (RECOMENDADO):
Password:
Switch>enable
Password:
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#username test3 secret 456789
Switch(config)#line vty 0 15
Switch(config-line)#secret test3
Switch(config-line)#login local
Switch(config-line)#exit
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]

* Si no puede cifrarlo mirar mas abajo que hay que tener preparado previamente "Para encriptar los password"

ENABLE

Configurar el acceso privilegiado al Switch (ENABLE) sin encriptar
Switch#
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable password xyz
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]

Configurar el acceso privilegiado al Switch (ENABLE) encriptado (RECOMENDADO):
Switch#
Switch#enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable secret zxc
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]

Como crea un usuario y contraseña sin encriptar:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#username test1 password 123
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]
Switch#exit

De momento este usuario no está asociado a ningu tipo de conexión para poder acceder al router.


Para encriptar los password (RECOMENDADO):
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#service password-encryption
Switch(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Switch#write mem
Building configuration...
[OK]
Switch#exit

Para Configurar acceso HTTP:
Switch(config)# hostname TestSW
Switch(config)# ip domain-name TestDominio
Switch(config)# ip http server
Switch(config)# ip http secure-server
Switch(config)# ip http authentication local
Switch(config)# username UsuarioTest5 privilege 15 secret 0a1b2c3
Switch(config)# line vty 0 15
Switch(config-line)# privilege level 15
Switch(config-line)# login local
Switch(config-line)# transport input ssh

Tema relacionado: http://gonsystem.blogspot.com/2011/02/como-encriptar-el-comando-show-running.html


Si queremos borrar un usuario:  "no username nombre_De_usuario"

3 comentarios:

Cesar dijo...

de casualidad no sabras esta información lo de los comandos si me sirvio pero ocupo esto tmb Procedimiento de creación de cuentas con privilegio de administrador en switch para acceder a el GUI de administrador vía http
Puntos clave
Cuantos tipos de usuarios se pueden registrar
Como se crean los usuarios
Como se establecen los passwords para los usuarios
Ejemplo del procedimiento completo para acceder al GUI http del switch (incluir imágenes)

Robinson Salazar dijo...

Bien explicado... Solo necesitaba lograr acceder con el usuario que creo en consola y acceder con el usuario desde telnet...

Anónimo dijo...

With cisco routers you need to save the configuration on a file because it's big and they do it with this method, normal web acces. And download the sys_backup.bin from remote support logs menu to insert on the router to can restore the SO firmware wth your configuration, directly without need to backp with the bkp file, router has more system than others adsl routers. Useful to upgradings.