0

On Linux box, As 'root' user, I changed the nproc and nofile limits (soft limit) as unlimited in "/etc/security/limits.d/90-nproc.conf" and "/etc/security/limits.conf". After that I am not able to login into server. When I try to login by putty, if I give correct password, the putty window just closes without any message. If I enter wrong password, it throws 'Incorrect password' message and prompts again for password.

Please let me know why it's getting closed as soon as I give correct password.

0

Since all those limits you have modified are applying on login you probably messed up one if those configs and now when you login the pam module will not allow you. Since we don't have more info I can only speculate what the problem is, it may be that nofile is higher then /proc/sys/fs/file-max or noproc higher than /proc/sys/kernel/pid_max

You are probably not going to be able to login until you fix these configs. You can try logging on the physical console(or KVM/ipmi) if you have access to one, but since these are probably global limits you won't be able to do so on the console too. You should give it a try anyway.

You may have to reboot in single user mode or even try passing init=/bin/bash kernel parameter in the bootloader to temporary obtain a shell and fix these files.

8
  • Thanks a lot for the reply. I will try that and update you Dec 12 '15 at 17:23
  • Well you should be very careful when meddling with pam, you can easily lock yourself out of the server. Its best to keep one open console and try logging on another so you can revert the changes in cases like this. Dec 12 '15 at 17:30
  • After booting in single user mode and reverting the changes, we were able to login. We started some services and from then onwards all the users are getting Access Denied error. But if we try to login from UI like VMWare, we are able to login. Please advise. Dec 14 '15 at 13:02
  • 'Access Denied'? what users? Is this related to the original problem and how? Dec 14 '15 at 17:47
  • We reverted back all the changes and rebooted the linux server and now we are able to login. But we are still not sure on how to increase those parameters. Below are the settings I see when I login. $ ulimit -a open files (-n) 64000 max user processes (-u) 64000 $ cat /proc/sys/fs/file-max 64000 $ cat /proc/sys/kernel/pid_max 32768 I doubt that pid_max should be always more than the settings done anywhere else. Can you confirm. Dec 14 '15 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.