# Could not login (PAM problems)

## -leliel-

Hi folks,

I haven't use my gentoo for a while and firstly made an emerge sync && emerge -u world. After a reboot I could not login through the console.

neo.matrix login: leliel

Login incorrect

neo.matrix login: root

Login incorrect

there's no password promt.  :Sad: 

I tried to login with ssh and all works fine. Even su to root.

This is the metalog output while trying to login from the console:

 *Quote:*   

> Oct 23 17:57:09 [login] PAM unable to dlopen(/lib/security/pam_unix2.so)
> 
> Oct 23 17:57:09 [login] PAM [dlerror: /lib/security/pam_unix2.so: cannot open shared object file: No such file or directory]
> 
> Oct 23 17:57:09 [login] PAM adding faulty module: /lib/security/pam_unix2.so
> ...

 

I also reemerged pam, but it doesn't even work.  :Sad: 

any suggestions?

----------

## deepthought

Maybe your CFLAGS are overoptimized. Reduce optimization and recompile pam.

Regards,

Alexander

----------

## pjp

Moved from Installing Gentoo.

----------

## maddog722

Shouldn't that be /lib/security/pam_unix.so (not pam_unix2.so)?  Check your PAM configuration (/etc/pam.d/login and probably /etc/pam.d/system-auth) and see what modules it is trying to load and make sure they actually exist in /lib/security.  Did you run etc-update and update the PAM configuration files after the emerge?  Try that.

----------

## -leliel-

I just had to reemerge the shadow suite.

thanks

----------

## Wilhelm

First my problem was that my SSL connection of postfix got screwed. Postfix couldn't authenticate anymore. The logs where crammed with debug info.

My solution my problem after reviewing all the infos is

In the /etc/pam.d/ directory find the package pointing to the invalid library.

In my case smtp (aka postfix) then remove that file and re-emerge the package (postfix).

I think postfix has a problem that it doesn't update the /etc/pam.d/smtp file but i'm a n00b so if someone could check that out it would be appreciated by loads of people suffering from the same problem.

----------

## Wilhelm

run "revdep-rebuild"

Works for problems between packages.

Due to emerging and changing of USE flags or versions it could happen that a .o library gets revoked by that new version. So all packages it leans on need rebuilding. revdep-rebuild does exactly that.

----------

## dalek

I tried the stuff above and no help.  I did change my CFLAGS recently and changed those back to the old setting and then re-emerged pam and all was well.

For the record, this is the line that broke it:

```
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
```

This is the one that worked:

```
CFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe"
```

That was with this rig.  They may both work for you.

I guess if this was windoze, I would be re-installing windoze right now.  Bill Gates >>>>>    :Razz:   :Razz:     Love doing that.

Later, thanks for the help, even though you didn't know you did.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

