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.
I wanted to pose this question prior to my doing research in the event someone may get back to me on this. When I boot CentOS, it goes through the "normal" displays and comes up to the login: screen. No matter WHAT login and password I use (which were set up in /etc/password and /etc/shadow), I get a message similar to "Invalid Password". (Sorry for not writing down the EXACT error message.) This is a SCHOOL project and I know it would be faster and easier to re-install CentOS, BUT I wanted to use this as a learning experience. WHAT IF this happened in real life? What would I do then? I want to find out how to PROPERLY do this, so in the future it would not be a problem if I REALLY had solve this type of problem.
I had saved /etc/passwd and /etc/shadow as .org files, so I copied these back over and rebooted, with the same results. I ALSO had copies of the files saved on a USB "stick", so I booted up with a Knoppix bootable cd. I was able to get into the CentOS directory structure without any problems. I unmounted all the drives and did a fsck, and they all passed. I copied over the /etc/passwd and /etc/shadow files from the USB to /etc. (/etc/passwd is rw-r-r root root and /etc/shadow is rw------- root root I think.) I rebooted CentOS and I stil have the same problem - no matter what login/password I use, it won't login.
(Over a period of a couple of weeks, I had added several different logins [at least 10]. There was root, student, rsmith, epoe, arice, sking, sshuser, techuser plus others I have forgotten. None of these now work.)
Being somewhat new to Linux, I am not technically sure WHICH files are used to confirm logins. There may be MORE files than those two, but those are the two I saved.
Sorry for going into verbose mode here, but I wanted someone to have a good unstanding of the way things are set up. I will research this site for possible answers, and search the web in general. I anyone knows, please get back to me. Thank you, Michael A Tipton
Unless some extra steps are taken (some extra security stuff, maybe), a "normal" shell login should only use /etc/passwd and /etc/shadow (the latter one for passwords stored and crypted) to check the login. Actually you should be able to create a new user account just by adding the relevant information there, plus creating a home directory if preferred. It the files are not what they should be, then it doesn't work.
root login should work always. If you have problems, and your BIOS (or BIOS password) doesn't stop you from booting from a livecd, or your bootloader doesn't ask you passwords (that you don't know) if you want to alter commands before booting, you can very easily reset root password and use that to reset the other passwords. Even simpler way is, if there is no bootloader password set (for GRUB, I don't use LILO anymore so I'll say nothing about it), to boot into single-user mode (runlevel number 1) which gives root login without password; then use passwd to set the passwords, or just check out what's wrong with the passwd and shadow files.