APC PDU #3 Howto reset the password under linux and windows step-by-step
A step-by-step tutorial on how to reset the password for the administrator user of an APC PDU both using Linux and Windows for the serial console terminal.
Since the reset procedure needs you to establish a connection to the APC PDU over the serial console, you will need a specialized console cable from APC (model: 940-0144A), or you can also build the cable yourself based on my previous tutorial.
Steps to reset the password:
1.) Attach the serial cable.
2.) Establish a serial console connection to the PDU using a terminal emulator program.
In this tutorial I will be showing you GNU screen under Linux, and Putty under Windows XP.
The setting for the serial port should be set at 9600 baud, 8 data bit, 1 stop bit, no parity bit and no flow control.
3.) Check that you have a working connection to the PDU over the serial port.
4.) Keep the the Reset button on the front panel pushed down for about 10 seconds, shortly release it, and quickly push the button again for a second.
This will initilize the password reset, so for 15 seconds the default username for the administrator user is "apc", and also the password is "apc".
This default username and password will no longer be "apc" once the short period of 15 seconds is over, so you need to act quick.
5.) Go back quick to the serial terminal program, and hit the Enter (Return) key on your keyboard repeatedly until you get prompted for the username and password.
Quickly enter "apc" without the quote marks of course for both.
6.) Through to the CLI menue go to the System menue, from there to User Manager, from there to the Administrator submenu. Now set the desired username and password, confirm the password when prompted, and now the password should be reset.
7.) Once you have a new username and password set up, close your serial terminal session, by pressing in the main menu twice the Escape key and select the option number 4 to log out, because otherwise your serial terminal will stay active, which might be exploited as a vulnerability.
COMMANDS UNDER LINUX:
a) Log is as the root user using sudo or su
b) With dmesg check that your USB-to-Serial cable have been detected by the kernel,
and the driver for the USB-to-Serial cable have been loaded
c) Figure out what is the device name for the USB-to-Serial cable
(most probably this will be /dev/ttyUSB0)
If you use a native serial port, than instead of /dev/ttyUSB0 just use the /dev/tty0 device.
d) Install GNU screen and use it as a serial terminal emulator program.
On Debian based distros:
apt-get install screen
On RedHat based distros:
yum install screen
e) Connect to the serial console of the APC PDU:
screen /dev/ttyUSB0
(screen /dev/tty0 on native serial port)
f) Push the Enter (Return) key a couple of times to establish the
connection over the serial port.
g) Initialize the reset procedure as described above.
h) Once you reset the username and password, to exit from
GNU scree, just press Ctrl+a on your keyboard, next press
the "k" key, and when asked for killing the window, just press "y"
and this will terminate your serial terminal session.