Problem with PAM settings

Hi
i wana limit maxlogins with pam but i have few problems ,

when i am settings maxlogins to 1 , each user can have maximum 2 ssh login ! and third login getting network faild

and when i am setting maxlogin to 0 , user are unable to login !

my problem is i wana limit ssh login to 1 !! not 2 Problem with PAM settings


and when ssh is limited for maxlogins , its not showing any msg and just showing network failed Problem with PAM settings , is there any way to show a msg ? like ( Too many logins , .... ) ?

and third problem in my ssh login , it showing like this :
Oct 5 10:12:37 server pam_limits[8932]: checking if user1 is in group testgroup1
Oct 5 10:12:37 server pam_limits[8932]: Too many logins (max 1) for user1
Oct 5 10:12:41 server sshd[8932]: fatal: PAM session setup failed[6]: Permission denied

what this line mean ?

Oct 5 10:12:41 server sshd[8932]: fatal: PAM session setup failed[6]: Permission denied

 

 

 

 

Top