Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Please help me, suddenly I closed myself out of my Linux!
When logged in as root, I typed 'passwd' without any user names.
Then I got the 'passwd:' prompt, and here I realized that I did a mistake.
Not knowing what is the best way to leave the 'passwd:' prompt, I decided to type in two different passwords, which, in my hopes, should have resulted in an error message and leaving the 'passwd:' prompt.
So, the first time I pushed some random keys and ENTER. Linux told me that the password is too short, and, unfortunately, gave me back the "passwd:' prompt. Then I typed in some other random keys and ENTER. For my astonishment, Linux told me: 'password changed'. I do not know how could I change the password this way, since I only typed in two different random key sequences, the first of which was even too short to be taken into account, as Linux itself told me (Until now, I thought that I have to enter and re-enter exactly the same key sequences of the correct length to change an existing password - which was not the case this time). Naturally, I wanted to change the password back while I was logged in as root, but Linux got into an unusual operating mode: from that time on all messages and prompts were printed on the same line. Confused by this behaviour, I did an other mistake: pressed CTRL+ALT+DEL to restart the system. Since then I cannot login into my Linux box.
Could you please tell me how could I clear the unintentionally changed root password, or to what extent should I re-install Linux to get back the command over my Linux box? Is it possible to keep the data and programs installed during such a re-installation of Linux? (I know I could do a complete re-install, but then all data and programs would be destroyed).
Your urgent help is a must, as I need Linux, furthermore, I can only browse the NET under Windows and IE in the meantime, which I hate. (My mouse does not feel well in Window$, either: it seems to limit its functionality to one single window on the screen and other windows can only be controlled by the keyboard - a thing that never happened in Linux and often happens in Windows nowadays.)
I use lilo, but it did not help:
When I type 'Linux Single', Linux gives me 'szj login:' prompt, and I can do nothing since I do not know the root password.
When I type 'init 1' Linux prints an error: 'no such image', then asks for the root password, which I do not know any longer.
I always started Linux as root from the beginning as I read somewhere that I may have difficulties in establishing dial-up connection on a normal user account (later I came to know that it is not true, but I was too lazy to change it and it was too comfortable to be root). I do not even know if I ever created any other user account and what password it may have. Maybe I always used a single user account and thus closed the last door?
If you have an emergency boot floppy, you can boot from it instead of through Lilo. You should be able to get into Single-user mode with it.
If that doesn't work, use a Google search to find the home page for "tomsrtbt" and download the Windows package of that system. It's a single-floppy Linux system complete with all utilities, and you can create it from within Windows. Then use it to boot, mount your hard drive as "/mnt/fix" or some similar name that's not in the file system, and from there use vi to edit /mnt/fix/etc/passwd. Delete the string of garbage-looking characters between the first two ":" characters on the line for "root" and save the file. Then reboot normally without the floppy, and you should be able to log in as root with no password at all. From there you can restore your original password.
Hope this helps. The procedure is spelled out in several of the introductory books, except for the use of "tomsrtbt" to get access to the file system without a normal login...
what i have to say will not help you at all, but i just wanted to say that all the guides et c i have read about user admin state right off the bat that the first thing you should do is create a non root account, and then never use root at all. When you need to do something as root it is incredibly easy to su to root, remembering to exit out again afterwards.
Sorry, again, it's not meant to be condescending, just an object lesson to any other readers who may be heading for the same problem...
As for Calum's note: you are absolutely right, but as I mentioned here, I am too lazy to change a practice that works and is comfortable. (Strange, but now, when this acciddent happened I was about to create some sample accounts to establish and test a multi-user backup system.) Just to reassure you: I would not recommend anyone else the practice I follow, moreover, when I did installations for my colleagues (whom I try to convince to use Linux at home) I always created the correct user's accounts and recommended them to use that instead of root.
I know this is an old thread, but there is something that is bugging me about it, and I'm wondering...
Would the procedure mentioned by JimKyle work to get access to the root account by someone other than root? It seems to me that a way to stop that easily would be to not allow it to boot from a floppy, but what if you use a floppy as a boot disk, for example if you have Windblows on another partition? And, you would block yourself out from using a rescue disk if you disabled booting from a floppy.
Any comments? Am I just nuts? Is there some simple way to stop access that way?
you can setup dual boot w/o floppy involved, but note if you are using a bootloader (which you should to dualboot) then there is still a possibility to boot into single usermode, unless you defined lilo or grub to boot directly to linux without a delay (this of course defeats the idea of dualboot), now there is still a solution - password protect a single usermode it is called creating trusted user profile - I found that Bastille http://www.bastille-linux.org can do it, but I was not successfull to figure out myself how to password protect single usermode w/o any third party soft, meaning I am still in search on how to create trusted user system profile.
The safest way is to password protect the boot loader like lilo for example, then making it only readable by root so no one can view the password that is setup in the file as its usually not encrypted.
Then you would want to password protect the BIOS and make it so you can't boot to a floppy or cdrom so they can't get around the boot loader password prompt to gain root access.
But of course they can always reset the BIOS by pulling the battery on board to reset any passwords setup, so if your really paranoid, then make sure the case has some sort of locking device.
And last, don't forget any of the passwords you setup and use, then you won't have any problems...
I don't know how it happened at all but once I put GNOME 2.0 on all of my logins went to hell. I just wanted to say that going through the whole forums and piecing together answers from posts on this forum really helped allot. Thank you to all of the answer givers.
By the way....MAKE A BOOT DISK IF YOU ARE INSTALLING A NEW SYSTEM (RH 7.3) BECAUSE IT WILL SAVE YOUR BACKSIDE!