Saturday, November 18th 2017, 8:22pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to NAS Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

HWguru

NAS2000-Team

Posts: 1,001

Location: Wien

1

Monday, April 21st 2008, 9:10am

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

Quoted

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

Quoted

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

Quoted

#
#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!