You are here:

Ubuntu and Associated Distributions/I am a student from University.My OS is Ubuntu 11.10.

Advertisement


Question
How can i change or know root password?

Answer
I'm answering this because I've assumed your interest is honorable.  In case it isn't, note that any forensics amateur will be able to figure out what was done even if you erase the hard drive.  

1. Boot from a live disk or USB and open a terminal.
2. mount the boot drive
3. cd to the mounted drive.
4. Open /etc/shadow.  In the first row, delete characters from
  the first column up to (but excluding) the first colon.
5. Save, shutdown
6. Reboot.  Log in as root, no password.

To retain the old password, copy the /etc/shadow file before editing it and use the copy to replace /etc/shadow.  This assumes you're doing it for someone who needs the old password and that the password file is hashed.  If passwords are stored as plain text in /etc/passwd there won't be a shadow file and the password.  Other methods (aside from MD5 hashing) have been used and are in use.  By deleting the password itself you won't need to deal with any of these concerns.

Note that this will leave a trail.

Ubuntu and Associated Distributions

All Answers


Answers by Expert:


Ask Experts

Volunteer


John Crout

Expertise

The command line, configuration files, recompiling the kernel, maintaining a system, hardening a system, package managers, browsers. Questions about Debian, Ubuntu, KUbuntu, MINT, Knoppix, CentOS, Red Hat Enterprise, Linux Wifi, embedded Linux, Live CD, forensics tools, vulnerability and pen testing tools, virtual installations.

Experience

LiveCDs, Debian, Red Hat, CentOS, Running on VMware, MINT, Ubuntu Studio, NIST Working Groups,

Organizations
Association for Computing Machinery Information Systems Security Association (ISSA), United States Coast Guard Auxiliary, ISC2, ACM

Publications
RTCA/DO-178B, "Software Considerations in Airborne Systems and Equipment Certification", (member of SC-167), RTCA/DO-160C, "Environmental Conditions and Test Procedures for Airborne Equipment", (member of SC-135) Student Doctor Magazine EE Times Network World blog Navy CIO blog Medforum CGAUX groups and CGAUX National Staff groups Analytic Bridge LinkedIn

Education/Credentials
Master of Public Health (Epidemiology and Biostatistics) Bachelor of Science in Electrical Engineering (Computer Engineering Option) Digital Forensics Basics, Texas Engineering Extension Secure Software, Texas Engineering Extension Network Security, Texas Engineering Extension Infosec Basics, Texas Engineering Extension Information Assurance Awareness, Department of Defense Information Systems Security, United States Coast Guard Online safety for parents and children, Fort Collins Police Department Spear Phishing, Defense Information Security Agency, DISA Spear Phishing, United States Coast Guard, USCG Meeting the Media, Testifying, Presentations, Arch Lustberg FEMA (ICS-100, -200, -210, -700, 800) United States Coast Guard Defense Information Systems Agency United States Coast Guard Auxiliary Crosby Quality Workgroup Facilitator Trainer Crosby Quality Education System Wisconsin University, ISSA training workshops

©2016 About.com. All rights reserved.