venerdì, 24 novembre 2017, 04:58 UTC+1

Non risulti loggato.

  • Login
  • Registrazione

Gentile visitatore,
Benvenuto su NAS Forum. Se questa è la tua prima visita, ti chiediamo di leggere la sezione Aiuto. Questa guida ti spiegherà il funzionamento di questa pagina. Prima di poter utilizzare tutte le funzioni di questo software dovrai registrarti. Usa la form di registrazione per registrarti adesso, oppure visualizza maggiori informazioni sul processo di registrazione. Se sei già un utente registrato, allora dovrai solamente procedere con il login da qui.

HWguru

NAS2000-Team

Posts: 1.001

Località: Wien

1

lunedì, 21 aprile 2008, 09:10

root Kennwort ändern / change root password permanently

Hi, hello
as one should know the default root password is raidsonic.
As that is not acceptable if you want to connect your box to the internet we need to change it permanently.

1. login onto your box and look at the file /etc/passwd with cat or

Citato

sed 1pd /etc/passwd
result should be: root:$1$$tFdOUzkKJ3t4VYX8OWAaa/:0:0:root:/root:/bin/ash
The password is stored in encrypted form as $1$$tFdOUzkKJ3t4VYX8OWAaa/

2. change the password to a good one with numbers, upper, and lower-case letters with the passwd command

3. execute sed again to get the new hash value

Citato

sed 1pd /etc/passwd
take the new password (between the two : ) and append the following lines to your init file of the do_it package

Citato

#
#change default password
#
mv /etc/passwd /etc/passwd.bak
sed 's/$1$$tFdOUzkKJ3t4VYX8OWAaa\//new_password_here/' /etc/passwd.bak > /etc/passwd
If the new password contains a / you must quote it with \ (/ --> \/ = \ + /) because / has a special meaning in unix (like within the default password).

Feel free to try it at your own risk!
Be careful to enter the string correctly or you will not be able to log in with root with putty afterwards.
In that case you need a serial cable connected to the box and interrupt the boot process at the point where "init" is called. Or you rename or move init so that it is not executed any more.

Be sure that init is read only to prevent a change of the password.

HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!