Sponsored Content
Operating Systems Linux SuSE How to lock the account after consecutive unsuccessful login in SUSE Post 302306899 by amitranjansahu on Tuesday 14th of April 2009 07:32:40 AM
Old 04-14-2009
In /etc/default/login define RETRIES=7;
It defines a global limit which, when locking is enabled, will lock accounts after exceeding this count.

By default its commented
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Setting an account to be a non-login account automatically?

Is there a way to easily change an account to be a non login account (NP in the shadow) file? I know I can just edit the file but that is not what we want to do. We use access control software and want to provide a way to set an account to be non-login using simple commands that can be mapped... (0 Replies)
Discussion started by: LordJezo
0 Replies

2. SuSE

Linux SuSE 10 - Disable Unsuccessful Login History.

When we login to any remote connections in SuSE Linux, say for example, telnet , the following line is displayed "Last Login : Date and time is displayed" I would like to disable this. In SuSE 9, I could find the solution . Please suggest me a solution to disable the line displayed for SuSE... (3 Replies)
Discussion started by: Laksmi
3 Replies

3. UNIX for Dummies Questions & Answers

Change Account to not lock account if password expires

I have access to 15+ UNIX boxes at work, and I do not consistently log onto all of them over time. When I do try to access one I havent been on in awhile, my account is locked as the password has expired. I need to request to the UNIX SA's that the password expiration is 90 days and that if it... (1 Reply)
Discussion started by: stringzz
1 Replies

4. Shell Programming and Scripting

lock an account

hi how can I Lock an account, by prepending ”*LK*” to the password field in /etc/shadow. I dont want to use passwd -l . Any idea? (3 Replies)
Discussion started by: tjay83
3 Replies

5. Solaris

How to lock the account after consecutive unsuccessful login

Dears, I want to lock the user's account after consecutive unsuccessful login attempts, how can I do this ? (1 Reply)
Discussion started by: mlsun
1 Replies

6. Red Hat

Security Question: Lock after invalid login, Session Lock and Required Minimum Password Length

Hello all, If anyone has time, I have a few questions: How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too. 1. How to lock the account after a few (like 3) invalid password attempts? 2. How do you lock a screen after 30... (1 Reply)
Discussion started by: nstarz
1 Replies

7. Cybersecurity

openssh_4.6 on Unixware 7.1.4 - ssh does not lock account after x attempts

Hi all, I am having some issues with openssh vers OpenSSH_4.6p1 on SCO unixware 7.1.4 when a user accesses the system via ssh and the password is incorrect and more attempts have been made that the lock out limit I find that although there are messages in the syslog the account does not lock... (0 Replies)
Discussion started by: chlawren
0 Replies

8. AIX

User Account Login Login on your AIX server

I want to learn AIX. I would like to find someone who would be willing to give me a login to their AIX home lab server. My intent is to poke around and discover the similarities and differences of AIX compared to other *NIXs. I am a UNIX admin so I can think of what some immediate concerns may... (1 Reply)
Discussion started by: perl_in_my_shel
1 Replies

9. Shell Programming and Scripting

How to exit shell script if remote login unsuccessful?

#!/bin/bash for servers in `cat ~/servers` do rosh -l root -n $servers 'if then echo $HOSTNAME else exit 1 fi' done I have few servers in the for loop that is powered off, so whenever I execute my script, it works fine if all the servers are on, but when it tries to execute the script... (1 Reply)
Discussion started by: Rojan Shakya
1 Replies

10. SuSE

Help in display unsuccessful login in SUSE Linux

hi i want to enable details of previous successful/ unsuccessful login on screen after successful login in SUSE linux ---------- Post updated 01-17-15 at 10:00 PM ---------- Previous update was 01-16-15 at 11:37 PM ---------- hi guys please reply (1 Reply)
Discussion started by: Idea
1 Replies
pam_unix_auth(5)					Standards, Environments, and Macros					  pam_unix_auth(5)

NAME
pam_unix_auth - PAM authentication module for UNIX SYNOPSIS
pam_unix_auth.so.1 DESCRIPTION
The pam_unix_auth module implements pam_sm_authenticate(), which provides functionality to the PAM authentication stack. It provides func- tions to verify that the password contained in the PAM item PAM_AUTHTOK is the correct password for the user specified in the item PAM_USER. If PAM_REPOSITORY is specified, then user's passwd is fetched from that repository. Otherwise, the default nsswitch.conf(4) repository is searched for that user. For accounts in the name services which support automatic account locking, the account may be config- ured to be automatically locked (see user_attr(4) and policy.conf(4)) after multiple failed login attempts. If the number of successive failures equals or exceeds RETRIES, the account is locked and PAM_MAXTRIES is returned. Currently, only the "files" repository (see passwd(4) and shadow(4)) supports automatic account locking. A successful authentication by this module clears the failed login counter and reports the number of failed attempts since the last successful authentication. Authentication service modules must implement both pam_sm_authenticate() and pam_sm_setcred(). To allow replacability of the authentication portion of UNIX authentication, pam_sm_setcred() in this module always returns PAM_IGNORE. This module should be stacked with pam_unix_cred(5) to ensure a successful return from pam_setcred(3PAM). The following options can be passed to the module: nowarn Turn off warning messages. server_policy If the account authority for the user, as specified by PAM_USER, is a server, do not apply the Unix policy from the passwd entry in the name service switch. nolock Regardless of the automatic account locking setting for the account, do not lock the account, increment or clear the failed login count. The nolock option allows for exempting account locking on a per service basis. ERRORS
The following error codes are returned from pam_sm_authenticate(): PAM_AUTH_ERR Authentication failure. PAM_BUF_ERR Memory buffer error. PAM_IGNORE Ignores module, not participating in result. PAM_MAXTRIES Maximum number of retries exceeded. PAM_PERM_DENIED Permission denied. PAM_SUCCESS Successfully obtains authentication token. PAM_SYSTEM_ERR System error. PAM_USER_UNKNOWN No account present for user. The following error codes are returned from pam_sm_setcred(): PAM_IGNORE Ignores this module regardless of the control flag. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ SEE ALSO
login(1), passwd(1), useradd(1M), usermod(1M), roleadd(1M), rolemod(1M), libpam(3LIB), pam(3PAM), pam_authenticate(3PAM), pam_set- cred(3PAM), syslog(3C), pam.conf(4), passwd(4), policy.conf(4), nsswitch.conf(4), shadow(4), user_attr(4), attributes(5), pam_auth- tok_check(5), pam_authtok_get(5), pam_authtok_store(5), pam_dhkeys(5), pam_passwd_auth(5), pam_unix_account(5), pam_unix_session(5) NOTES
The interfaces in libpam(3LIB) are MT-Safe only if each thread within the multi-threaded application uses its own PAM handle. The pam_unix(5) module is no longer supported. Similar functionality is provided by pam_authtok_check(5), pam_authtok_get(5), pam_auth- tok_store(5), pam_dhkeys(5), pam_passwd_auth(5),pam_setcred(3PAM), pam_unix_account(5), pam_unix_cred(5), pam_unix_session(5). If the PAM_REPOSITORY item_type is set and a service module does not recognize the type, the service module does not process any informa- tion, and returns PAM_IGNORE. If the PAM_REPOSITORY item_type is not set, a service module performs its default action. SunOS 5.10 2 Aug 2004 pam_unix_auth(5)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy