I remember i had same problem few days ago when tried to login as root it solved after etc-update.

I got this error also, but after building I could have sworn there was no message to update configs via etc-update. pam was one of the packages that was upgraded. That did fix the issue for me though, thanks for the help.

Just the stupid question to you, who could not solve this problem: when you run etc-update, you do let it to update your configuration files, right?

Sorry for being a noob.
I know I am.

etc-update DOES help fix this if you let it update the config files.

Thanks

##EDIT##
What I actually did are the following(incase some need to know);
etc-update then let it auto-merge (-5)
Then I go after the files I think I change something in there, e.g. /etc/conf.d/local.start , /etc/conf.d/hostname , /etc/conf.d/domainname, /etc/rc.conf ...
And fix them.

The solution to this problem is emerge pam-login and then run dispatch-conf or etc-update and let it update the files, esp login.defs

Didn't work for me. After emerging pam-login no configuration files should be updatet. etc-update and dispatch-conf don't do anything. Someone may post his /etc/login.defs to check which lines can be removed or uncommented.

I encountered this error whilst su'ing during an emerge -uD world. After the emerge was finished I ran etc-update, compared the changes to files I had modified and automerged the rest. Problem solved._________________maguire's emwrap

You know though, this is a funny funny thing... EVN_ROOTPATH for me is being bitchy. I made a horrid mistake (when will i learn) and deleated the old configs, the things that are like... .__cfg???? whatever. The funny bit from this is this:

my rootpath defaults to my user path when I log on as root, when I su this actuilly does work. It made my comptuer better! This to me means that they changed a lot of init vars in the last update and didn't bother to make the /etc/login.def backwards compatable thinking that all you would have to do is etc-update. IE I really think that even if you have these errors it's not going to do anything harmful, can someone back me up here though? I can't really see any security holes anywhere from the vars that are here, but this just seems to beg the question...

Where does root get it's path from? The only thing I could come up with was that the dev's made it just like the users where you have your .bashrc and this defines everything for your env login. If I run into some problems I'll start posting but for now, without a valid actual file, I am not seeing any issues. I could of course be horrably wrong though. ~Ben

i had the same problem and i guess i found a working solution, but it is not the best way to fix the problem so if there are other ways try these...

first you have to backup /etc/login.defs and the complete folder /etc/pam.d/ then you do "emerge --unmerge pam pam-login". after that you delete these files and folders (/etc/login.defs and /etc/pam.d/) completely and re-emerge pam and pam-login. (emerge pam pam-login). the last step is to copy the backed-up files back into the /etc-folder and do NOT overwrite the "newly" emerged files.

it worked for me, but like i said: if you can fix it in another way you should do it!

I just wanted to confirm that sebastianfietzek's method worked for me also. It's only been a day, and I haven't restarted yet, but after running

Code:

env-update && source /etc/profile

everything is working fine. If I encounter any other problems, I'll post them back here. And before anybody asks, for some reason that escapes me now, I mustn't have let etc-update write a new login.defs file, which is why etc-update doesn't help me.

I've got my own solution. What I had done was updated world, then since I don't trust etc-update at all (it f**ked me over before) I didn't let it update anything. So I moved /etc/login.defs to /etc/login.defs.old and remerged pam-login. It worked.

So the problem seems to be that some oprions are present in /etc/login.defs that the system does not recognize while loging in (or su-ing).
The only problem I had was the line "PASS_MIN_LEN 5".

I looked at the man page for login.defs and could not find any definition for PASS_MIN_LEN, however I found a man page on the internet which describes it as a password restriction option used by passwd (the man page : http://www.cs.vassar.edu/cgi-bin/man2html?login.defs+5). Could this be a deprecated option or distro-specific option or something like that?

I simply removed the line. The I tried to set the password to a very short one, and I still got a warning about the password beein to short.

Then I tried messing about with the user profiles with the gnome-system-tools and quite correctly the line "PASS_MIN_LEN 5" reappeared in /etc/login.defs/

I've got my own solution. What I had done was updated world, then since I don't trust etc-update at all (it f**ked me over before) I didn't let it update anything. So I moved /etc/login.defs to /etc/login.defs.old and remerged pam-login. It worked.

Same thing for me. I've also learned to not use Gnome windows when creating another user