LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New system won't allow root after installation - using correct password and "root" (https://www.linuxquestions.org/questions/linux-newbie-8/new-system-wont-allow-root-after-installation-using-correct-password-and-root-681812/)

kn2y 11-07-2008 12:27 PM

New system won't allow root after installation - using correct password and "root"
 
I installed CentOS 5.2 on a brand new machine and it was working fine for two days except that no linux drivers were installed for the lan adaptor. I finally found the drivers (on the mother board CD) and attempted to install them. I needed to reboot following and when it came up it would not allow a root login. I fooled around and searched google for a way to change the root password without reinstalling but found none so I re-installed allowing a new format and all. When I started up for the first time the password still did not work.. I always use the same pw for root so I know it is correct. I have had a linux server online for the past six years or so. Some one else set it up for me but I decided it was time to fly from the nest!

i92guboj 11-07-2008 12:36 PM

Some of the basics that you might already know, but I have to ask just in case:
  • use a true login and not su, some systems will not allow su login unless your user is on the wheel group (dunno about centos)
  • some distros do not allow root logins on some vt's, in gentoo we use /etc/security/access.conf for that
  • look for caps lock when setting the password, and when entering it afterwards

jay73 11-07-2008 01:01 PM

Two questions:
- can you log in as a normal user?
- If not and if you run X, which keyboard layout and which graphics card do you use ?

onebuck 11-07-2008 03:51 PM

Hi,

Welcome to LQ!

I agree with the above posters on simple things you should check. Keyboard first, caps lock or keyboard layout during install.

If you have a livecd then boot using that.

After you get to the login then from the cli (command line);

Code:

~#mkdir /Your_temp                  #temporary mount point
~#mount /dev/your_device /Your_temp  #this is the device you installed to
~#chroot /Your_temp                  #change to yours
~#cd /Your_temp/etc                  #change to directory with passwd

If you feel you have a password problem then you can modify the '/etc/passwd'.

Code:

excerpt from 'man passwd';
NAME
      passwd - change user password

SYNOPSIS
      passwd [name]
      passwd [-x max] [-n min] [-w warn] [-i inact] login
      passwd {-l|-u|-d|-S|-e} login

DESCRIPTION
      passwd  changes  passwords  for  user accounts.  A normal user may only
      change the password for his/her own account, the super user may  change
      the password for any account.

  Password Changes
      The user is first prompted for his/her old password, if one is present.
      This password is then encrypted and compared against the  stored  pass-
      word.  The user has only one chance to enter the correct password.  The
      super user is permitted to bypass this step so that forgotten passwords
      may be changed.


kn2y 11-07-2008 04:19 PM

No, can no longer login as any user. I've tried the caps key both ways. I don't mind reinstalling but did that twice and it accepted the passwords on initial setup and then refused them after final boot. Strange! Is there any way to wipe the disk format (altho the installation asks me if I want to and I say "yes") and start fresh?

Doug
former XP user


Quote:

Originally Posted by i92guboj (Post 3334670)
Some of the basics that you might already know, but I have to ask just in case:
  • use a true login and not su, some systems will not allow su login unless your user is on the wheel group (dunno about centos)
  • some distros do not allow root logins on some vt's, in gentoo we use /etc/security/access.conf for that
  • look for caps lock when setting the password, and when entering it afterwards


jay73 11-07-2008 05:09 PM

You know, there is an issue with some nvidia drivers and non-us keyboard layouts. I have been bitten by it more than once in the last months. Everything is working fine, then you install the driver and suddenly you can't login anymore. After a while, I figured out that I could log in if I used my azerty keyboard as if it had a US layout, typing a "q" where an "a' was needed, etc.

kn2y 11-07-2008 07:52 PM

Thanks to all that offered help.
 
I did a reinstall and solved the problem.. thanks to all who offered solutions.. I hope to be active here and maybe someday can answer a few questions myself.. Doug

Quote:

Originally Posted by kn2y (Post 3334662)
I installed CentOS 5.2 on a brand new machine and it was working fine for two days except that no linux drivers were installed for the lan adaptor. I finally found the drivers (on the mother board CD) and attempted to install them. I needed to reboot following and when it came up it would not allow a root login. I fooled around and searched google for a way to change the root password without reinstalling but found none so I re-installed allowing a new format and all. When I started up for the first time the password still did not work.. I always use the same pw for root so I know it is correct. I have had a linux server online for the past six years or so. Some one else set it up for me but I decided it was time to fly from the nest!



All times are GMT -5. The time now is 04:24 PM.