[Linux-Biella] password root

Mattia Rossi linux@bilug.linux.it
Mon, 28 Jul 2003 21:25:54 +0200


On Sat, 26 Jul 2003 19:04:26 +0200 (CEST)
<vallinidaniele@libero.it> wrote:

> 
> In una delle mie macchine non viene piu' riconosciuta la password di root.
> 
> Il sistema SuSE non permette il boot come single.
> 
> Se tiro su root con il sistema di rescue dal CDROM il comando passwd non
> modifica la password shadow sull' HD.
> 


Generati un hash noto, e cambia il campo password in /etc/passwd (o in /ec/shadow)con quello.
Questo e' un esempio, ma io ho mandrake e le password sono in /etc/shadow:


[root@star mattia]# cat /etc/passwd | grep tony
tony:x:505:505::/home/tony:/bin/bash
[root@star mattia]# cat /etc/shadow | grep tony
tony:!!:12237:0:99999:7:::

-- utente tony al momento senza password ---

[root@star mattia]# passwd tony (cippalippa)
Changing password for user tony.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@star mattia]# cat /etc/shadow | grep tony
tony:$1$2Uj/35Ep$UDgMS8oLfJ2FNBC5UjvY0.:12261:0:99999:7:::
[root@star mattia]#

$1$2Uj/35Ep$UDgMS8oLfJ2FNBC5UjvY0. e' l'ahsh per la password 'cippalippa' ....

Mattia