[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to execute a module only when the previous one fails.

On Wed, May 15, 2002 at 10:55:43AM +0000, Adharsh Praveen R wrote:
> I have a peculiar problem.

> I have 3 users say user1 password as user1
>                                 user2 password as user2
>                                 user3 password as user3

> All these users are allowed to use SSH.

> When some new user tries to login with username as user1 and types a
> password wrong,

> In other sense tries to hack.

> I want PAM to execute one module when it is wrong & skip that module
> when it is correct.

> Something like a if condition

>     if(password entered is wrong)
>     {
>             Execute this module
>     }

> If I try to use ssh and try to login as

> user1 and password as kfjdlk which is wrong I want to execute the below
> line how can I do this.

> Any ideas .

> How should I configure /etc/pam.d file.

Linux-PAM supports an extended configuration file syntax that allows for
such branching.  The format is described in section 4.1 of the Linux-PAM
System Administrator's Guide, included in the Linux-PAM distribution.

The error code that signifies an invalid password has been typed is 
'auth_err' (as opposed to, say, 'user_unknown').

Steve Langasek
postmodern programmer

Attachment: pgp00007.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []