Difference between revisions of "Recover lost administrator password"

From BubbaWiki
Jump to navigation Jump to search
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
If you have lost your administrator password here are two ways of recovering it.<br>  
If you have lost your administrator password here are two ways of recovering it, follow A or B below!<br>  


'''A'''<br>  
= A<br> =


This alternative requires that you have a user that has shell log in activated.<br>  
This alternative requires that you have a user that has shell log in activated.<br>  


#Log in via SSH with your user.<br>
1. Log in via SSH with your user.  
#Become root with the command su (password 'excito').<br>
#Type the command 'passwd admin'.<br>
#Now enter a new password (retype it when asked for).
#Done!


<br>
2. Become root with the command su (password 'excito').


'''B'''
3. Type the command:
<pre>passwd admin
</pre>
4. Now enter a new password (retype it when asked for).
 
5. Also change the samba password with the following command:
<pre>smbpasswd admin
</pre>
6. Now enter a new samba administrator password (retype it when asked for).
 
7. Finally type:<br>
<pre>reboot
</pre>
Done! <br>
 
= B =


If you do not have a user with shell access do like this.  
If you do not have a user with shell access do like this.  


#Download the latest install image: B3: [http://update.excito.net/install/latest/b3 update.excito.net/install/latest/b3] or B2: [http://update.excito.net/install/latest/bubba-two/ update.excito.net/install/latest/bubba-two/]<br>
1. Download the latest install image: B3: [http://install.excito.org/latest/b3 install.excito.org/latest/b3] or B2: [http://install.excito.org/latest/bubba-two/ install.excito.org/latest/bubba-two/]  
#Unzip the downloaded zip file to a USB stick, there will be a catalog named 'install' in the root.  
 
#
2. Unzip the downloaded zip file to a USB stick (with the file sytem FAT32 and with a partition table), there will be a catalog named 'install' in the root.  
 
3. In the catalog 'install' you will find a file called 'bubba.cfg', open it with an editor. Use for example [http://www.contexteditor.org/ www.contexteditor.org/] or [http://www.flos-freeware.ch/notepad2.html www.flos-freeware.ch/notepad2.html]. Using Windows Notepad or Wordpad will destroy the file. Edit the line ('''this is important''', if you forget this your B3 will be '''completely reinstalled''') DO_INSTALL to the following:
<pre>DO_INSTALL=0
</pre>
4. Shut down your unit and unplug the power cord.
 
5. Connect the unit to your network (you must have a DHCP server other than B2/B3) via the LAN or WAN port.
 
6. Insert your USB stick into one of the ports on your unit.
 
7. Keep the button on the backside pressed while inserting the power cord. Keep it pressed for five seconds and then release it.
 
8. After about 1 minute you will be able to reach your unit via the IP address given to the unit from your DHCP server.
 
9. Login via SSH with username 'root' and password 'excito'.
 
10. Type the following commands:
<pre>mount /dev/sda1 /mnt
</pre><pre>chroot /mnt /bin/bash
</pre><pre>passwd admin
</pre>
11. Now enter a new administrator password (retype it when asked for).
 
12. Also change the samba password with the following command:
<pre>smbpasswd admin
</pre>
13. Now enter a new samba administrator password (retype it when asked for).


<br>
14. Finally type:<br>
<pre>reboot
</pre>
Done!<br>

Latest revision as of 02:03, 29 July 2015

If you have lost your administrator password here are two ways of recovering it, follow A or B below!

A

This alternative requires that you have a user that has shell log in activated.

1. Log in via SSH with your user.

2. Become root with the command su (password 'excito').

3. Type the command:

passwd admin

4. Now enter a new password (retype it when asked for).

5. Also change the samba password with the following command:

smbpasswd admin

6. Now enter a new samba administrator password (retype it when asked for).

7. Finally type:

reboot

Done!

B

If you do not have a user with shell access do like this.

1. Download the latest install image: B3: install.excito.org/latest/b3 or B2: install.excito.org/latest/bubba-two/

2. Unzip the downloaded zip file to a USB stick (with the file sytem FAT32 and with a partition table), there will be a catalog named 'install' in the root.

3. In the catalog 'install' you will find a file called 'bubba.cfg', open it with an editor. Use for example www.contexteditor.org/ or www.flos-freeware.ch/notepad2.html. Using Windows Notepad or Wordpad will destroy the file. Edit the line (this is important, if you forget this your B3 will be completely reinstalled) DO_INSTALL to the following:

DO_INSTALL=0

4. Shut down your unit and unplug the power cord.

5. Connect the unit to your network (you must have a DHCP server other than B2/B3) via the LAN or WAN port.

6. Insert your USB stick into one of the ports on your unit.

7. Keep the button on the backside pressed while inserting the power cord. Keep it pressed for five seconds and then release it.

8. After about 1 minute you will be able to reach your unit via the IP address given to the unit from your DHCP server.

9. Login via SSH with username 'root' and password 'excito'.

10. Type the following commands:

mount /dev/sda1 /mnt
chroot /mnt /bin/bash
passwd admin

11. Now enter a new administrator password (retype it when asked for).

12. Also change the samba password with the following command:

smbpasswd admin

13. Now enter a new samba administrator password (retype it when asked for).

14. Finally type:

reboot

Done!