miércoles, 22 de octubre de 2014

HOW TO: SOLICITAR CAMBIO DE CLAVE AL PROXIMO LOGIN EN LINUX

Como root, ejecutar:

# chage -d 0 nombre_usuario

Ejemplo: chage -d 0 frankcho

Con la opción "-d 0", obligamos al usuario al iniciar sesión, a cambiar su clave:

frankcho@framirez-linuxPC:~$ ssh frankcho@192.168.1.1
frankcho@192.168.1.1's password:
You are required to change your password immediately (root enforced)
Last login: Wed Oct 22 15:54:21 2014 from 192.168.31.9
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user frankcho.
Changing password for frankcho
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Connection to 192.168.1.1 closed.
frankcho@framirez-linuxPC:~$

Para finalizar, iniciamos nuevamente sesión ahora con el nuevo password seteado en el password anterior.