473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

forgotten root password

Hi friends,
I hv forgotten my password & unable log in on my system....
I hd tried by making system in SINGLE mode
PLZ tell me different ideas to enhance my knowledge
Oct 6 '07 #1
4 1670
The best method I know of is setting the boot loader (mine is Grub) to boot differently. On my machine this is F2 to add in parameters. What you mention is "single" although I haven't tried this. What I done was "init=/bin/bash"

Once you've added this it should boot up in a root terminal, here you can do the "passwd" command here. Simply set the new passwrod and reboot.

Good luck!

P.S please remember to create and USE another account other than root. This is very important as its easy to mess up your system under root and also if you get cracked the cracker will instantly have root privileges.
Oct 6 '07 #2
Hi friends,
I hv forgotten my password & unable log in on my system....
I hd tried by making system in SINGLE mode
PLZ tell me different ideas to enhance my knowledge
The best way of doing it is the single mode (which you tried)
Please tell me what problem you faced while doing the same. It is pretty easy and I guess if you give me the exact ouput i might help.
Oct 8 '07 #3
prn
254 Expert 100+
You don't say what kind of system you are dealing with, but whether it is Linux or Solaris or whatever, the answer is basically similar.

The most effective way of dealing with a forgotten root password (and please do take White Rider's suggestion of not normally logging in as root) is to boot from a cd (live cd or installation cd) and then from a shell, you mount the HD / partition, navigate to /mnt/etc (or whereever you mounted it), back up your shadow file (just in case) with "cp shadow shadow.bak", then edit shadow, removing the characters between the first and second colons ( : ) so that the "root" line begins with

root::

DO NOT REMOVE ANYTHING ELSE!

Sorry to shout, but that's very important. You could seriously mess up your system. (Of course, that's why I told you to make a backup first).

Now you should be able to reboot, log in as root and set your password. Then don't forget it! After that, make sure to log in as a normal user most of the time and su to root only when you specifically need it.

HTH,
Paul
Oct 8 '07 #4
vinot85
53
Hi buddy,

You can just modify the kernel arguments by appending -s to the lines specified on the boot loader.This will give you the bash shell on single user mode.You can just use the passwd command to do the thing.

The above idea will work out if there is no authentication by boot loaders.If there is any password specification for boot loaders, You cannot modify the kernel arguments.Still now i didnt heard any ideas to modify them.Is there any way to solve this problem?
Oct 9 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Florian | last post by:
I've been stumbling over this, what I consider strange, behaviour. I installed mySQL on a Win2k machine and tried to change the root password, which didn't seem to work. I changed it this way: ...
1
by: Adam Smith | last post by:
I have a new DB provided by my ISP don't know details of installation, setup etc. I can log in as anybody except root. mysql -h localhost -u mysql Welcome to the MySQL monitor. Commands end...
5
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
2
by: Showjumper | last post by:
A question regarding forgotten passwords - As i understand it, it is best and most secure to use a 1 way hash+salt to store passwwords, and then if the user has forgotten the password, generate a...
8
by: Katash | last post by:
Hello, I am new to PHP and am working on a login system for my site, currently supplied passwords are passed to MySQL and stored as md5 hashes, my question is :- seeing as md5 is 1 way only what...
4
by: Bob | last post by:
I'm just starting PHP and MySQL - and really like the book by Welling and Thomsom. I've installed MySQL on my WinXP desktop, along with Apache and PHP. I have not figured out how to set a...
7
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ...
1
by: mattsql22 | last post by:
I just installed Red Hat Enterprise 5, along with MySQL. I have run mysql_install_db and I can see the mysql folder that contains the 'mysql' database with the users. Unfortunately, I can't login...
2
by: ivytony | last post by:
First of all, I'm not sure if I've set up root password for MySQL server or not. I was following this tutorial http://www.howtoforge.com/centos-5.1-server-lamp-email-dns-ftp-ispconfig-p4 to install...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.