# Login problem [SOLVED?]

## martoni

Apologies if this is the wrong forum.

I seem to have done something stupid as I no longer can login from a non-gui console.

Using Xdm I can login to my user or root, but going ctrl-alt F5 or doing a non-gui system (no xdm in default runlevel) I get the login in prompt but am always returned to it a few seconds after entering my user name or root. I never get the password prompt.

What might I have done?Last edited by martoni on Sat Mar 26, 2005 11:11 am; edited 1 time in total

----------

## tukachinchila

Can you post your "/etc/securetty"?

Hopefully you have "vc/1" uncommented.

----------

## martoni

# /etc/securetty: list of terminals on which root is allowed to login.

# See securetty(5) and login(1).

vc/1

vc/2

vc/3

vc/4

vc/5

vc/6

vc/7

vc/8

vc/9

vc/10

vc/11

vc/12

tty1

tty2

tty3

tty4

tty5

tty6

tty7

tty8

tty9

tty10

tty11

tty12

tts/0

ttyS0

----------

## tukachinchila

Does /bin/login exist? If it doesn't, try re-emerging pam-login. If it does exist, try looking in your logs for any errors related to login (e.g., /var/log/messages, /var/log/everything/current, etc.).

----------

## martoni

martoni@Carnelian ~ $ ls /bin/login

ls: /bin/login: No such file or directory

Nope, apparently gone. I'll have a go at it, when the KDE upgrade is over and done with (might have disappeared when desperately getting KDE 3.4 to emerge: https://forums.gentoo.org/viewtopic-t-312341-highlight-.html).

----------

## martoni

Nope; the only difference after emerging pam-login was the error message "invalid login".

On both user and root.

----------

## tukachinchila

What are the permissions of /etc/shadow, /etc/passwd, and /etc/group? They should be: 600, 644, and 644, respectively. Can you read each of these files to verify they're not corrupt?

If that doesn't work, try re-emerging baselayout and shadow. Then run etc-update and overwrite any existing files to be sure those files are not corrupt. You can also try using the pwconv program to recreate your /etc/shadow file from your /etc/passwd. Read the man page for pwconv for more help with that.

----------

## martoni

Looks  OK - and are readable.

Carnelian martoni # ls -l /etc/shadow

-rw-------  1 root root 1223 Mar 25 21:37 /etc/shadow

Carnelian martoni # ls -l /etc/passwd

-rw-r--r--  1 root root 1979 Mar 25 21:37 /etc/passwd

Carnelian martoni # ls -l /etc/group

-rw-r--r--  1 root root 804 Mar 25 21:37 /etc/group

I'll give the rest a try during the weekend.

----------

## martoni

*Heavy sigh.*

Nope.  *Quote:*   

> Login incorrect.

 

I do wonder whatever I did as this worked before I started the upgrade of KDE. It's strange, I think, that login through KDM/XDM works while login through the CLI prompt fails.

----------

## martoni

I seem to making some progress here. After reading through this page I tried copying the pam settings for XDM (which worked, and I suppose also govern KDM) to login (console/terminal login)

```

#mv /etc/pam.d/login /root/OLDlogin

#cp /etc/pam.d/xdm /etc/pam.d/login

```

rebooted (don't know if it is necessary) testing loging in through KDM (worked) loged out and tried logging in after CTRL+ALT+F2 (getting a terminal) I get the login prompt enter my username and I get the password prompt! And when I enter my password I'm in! 

Looks good so far... don't know if I'm missing essential things by this method but it works at least temporarily.

----------

