English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I forgot the root password.

How can I recover it?

2007-01-07 23:14:39 · 4 answers · asked by Anonymous in Computers & Internet Security

4 answers

The best way is to boot the system into single-user mode. If you are running GRUB as your bootloader, then type "b" at the GRUB boot prompt. If you are running LILO as your bootloader, then type "linux single". The system should dump you into a bash shell. From there run "passwd root" and set a new password.

2007-01-08 15:07:56 · answer #1 · answered by mookie 3 · 0 0

Depends on the system. 'Recover' is not easy... change it is easier if you are permitted:

If it's linux, you probably got 'sudo' set up as part of the installation on the low-level administrator's account so you can use:
sudo passwd root
and give it your account password then the new password for root.

If it's not linux or there is no 'sudo' then you have to boot the computer into single user mode. How you do that depends on the type of unix, but you probably need to use the console. You probably will have to crash the computer to single user mode if you can't remember how to shut it down. If you crash the operating system you have to interrupt it on the way back up and go into single user mode... for hp-ux you would use 'hpux -is' at the ISL prompt.

If you want to recover the password you will have to try to crack the password using a brute force tool (or a not brute force tool if you set a weak password) which may take days.

Because you can crack system security is why you *must* make sure that your server is physically secure so no-one can use the console, why you *must* use a good password on your server(s) to make cracking them difficult, why you *should* ensure ordinary users can't use root to run unauthorised activity and why your *should* check for failed logins to root.

If you try to crack a system that is not *yours* or that you do not have administration rights for you *must* expect that the legitimate sysadmin will detect your work and will do their utmost to arrogate any rights you may have on the server.

2007-01-08 07:29:53 · answer #2 · answered by bambamitsdead 6 · 0 2

You're screwed. The root pass is not meant to be recovered due to security purposes. You'll need to reinstall the OS.

2007-01-08 07:18:26 · answer #3 · answered by Anonymous · 0 2

try this:
http://aplawrence.com/Linux/lostlinuxpassword.html

but in general, you're hosed.

2007-01-08 07:19:16 · answer #4 · answered by Anonymous · 0 2

fedest.com, questions and answers