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

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

 



--1yeeQ81UyVL57Vl7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
'auth_err' (as opposed to, say, 'user_unknown').

HTH,
Steve Langasek
postmodern programmer

--1yeeQ81UyVL57Vl7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE84mRiKN6ufymYLloRAkieAKCy5zwFZRn6YOZVGXp/y1ITSSzb9ACfbuUp
yYCgZ9vZmG0E8Uy+Xo4HF20=
=zTct
-----END PGP SIGNATURE-----

--1yeeQ81UyVL57Vl7--





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux