Sponsored Content
Full Discussion: NIS password policy
Operating Systems Linux Red Hat NIS password policy Post 302464910 by ygemici on Thursday 21st of October 2010 09:29:59 AM
Old 10-21-2010
** If you have /lib/security/pam_pwdb.so
append below to your /etc/pwdb.conf in client
Code:
user:
    unix+shadow
    nis+unix+shadow
group:
    unix+shadow
    nis+unix+shadow

change like below to /etc/nsswitch.conf
Code:
passwd:     files nis
shadow:     files nis
group:      files nis

append like below to /etc/pam.d/passwd
Code:
auth  required  /lib/security/pam_pwdb.so shadow  
account  required  /lib/security/pam_pwdb.so  
password  required  /lib/security/pam_cracklib.so retry=3  
password  required  /lib/security/pam_pwdb.so use_authtok md5 shadow


** if you have not pam_pwdb.so then append like below to /etc/pam.d/passwd
Code:
password required pam_unix.so obscure min=8 max=15 md5 nis
password required pam_cracklib.so retry=3 retry=3 minlen=12 dcredit=2 ucredit=2 lcredit=1 difok=3
password sufficient pam_unix.so obscure min=4 max=8 md5 nis use_authtok
password required pam_unix.so obscure min=4 max=8 md5 use_first_pass

** if you dont success for these methods then u can try this module for nis
PAM NIS authorisation module

good lucks
regards ygemici

Last edited by ygemici; 10-21-2010 at 11:19 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Need openLDAP + Password policy guide

Hi all of you.............. I am using openldap on ubuntu server . i want to apply password policy for user's to set password length , expire date , ......etc. can anybody guide me to configure this. (1 Reply)
Discussion started by: jagnikam
1 Replies

2. Solaris

Password policy problem ??

Hi Solaris's expert I need to change user password on Solaris10 2 servers. With the same password I can change it just only one. Try to check everything but not found difference?? password pattern: abcdeFgh9Jk server1 check all characters but server2 check only first 8 characters.Why??... (10 Replies)
Discussion started by: arm_naja
10 Replies

3. Red Hat

Shadow file password policy

Today i was going through some of security guides written on linux . Under shadow file security following points were mentioned. 1)The encrypted password stored under /etc/shadow file should have more than 14-25 characters. 2)Usernames in shadow file must satisfy to all the same rules as... (14 Replies)
Discussion started by: pinga123
14 Replies

4. Solaris

password policy for new user

hi folk, i try to setup a new password policy for our solaris box user, below are the /etc/default/passwd/, but then when i tried to create a user, it didn't ask for numeric character, and the new password also didn't ask for special characters. # useradd testing # passwd testing New... (7 Replies)
Discussion started by: dehetoxic
7 Replies

5. Ubuntu

User and Password Policy

Hi linux expert, i would like to create a script for listing all user with there password policy. It should be in the following format: Last password change : Sep 19, 2011 Password expires : never Password inactive : never Account... (2 Replies)
Discussion started by: yprudent
2 Replies

6. Red Hat

Password Policy description

Hi Experts, i would like to know the description of the following: Minimum: 0 Maximum: 90 Warning: 7 Inactive: -1 Last Change: Never Password Expires: Never Password Inactive: Never Account Expires: Never Does this means that... (2 Replies)
Discussion started by: yprudent
2 Replies

7. Solaris

Solaris and PAM Password policy

Hello All, I have Sun DSEE7 (11g) on Solaris 10. I have run idsconfig and initialized ldap client with profile created using idsconfig. My ldap authentication works. Here is my pam.conf # Authentication management # # login service (explicit because of pam_dial_auth) # login ... (3 Replies)
Discussion started by: pandu345
3 Replies

8. Ubuntu

Password Expiration Policy

Hello Team, I am using Lubuntu & have DRBL remote boot setup with open Ldap authentication. Currently there is no password expire policy. I want to set Password Policy so that user's password will expire after a month & they will get prompt to change their password. Using PAM we can do it,... (1 Reply)
Discussion started by: paragnehete
1 Replies

9. AIX

Password Policy

I need help. I have set a password policy. But I want to dis allow setting user name as password. My policy is as below... min length =8 min diff=2 min alpha=2 max repeats=2 dictionary= /usr/share/dict/words Still user can set his username as password (i.e. Jackie1234). Code tags for... (11 Replies)
Discussion started by: powerAIX
11 Replies

10. Red Hat

Password policy for root

Hi, I am unable to enforce password complexity policy for root user. (other users are working) on RHEL 6.2. Anything wrong with system-auth parameters? PLease help.. vi /etc/pam.d/system-auth #%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time... (1 Reply)
Discussion started by: suresh3566
1 Replies
PAM_UNIX(8)							 Linux-PAM Manual						       PAM_UNIX(8)

NAME
pam_unix - Module for traditional password authentication SYNOPSIS
pam_unix.so [...] DESCRIPTION
This is the standard Unix authentication module. It uses standard calls from the system's libraries to retrieve and set account information as well as authentication. Usually this is obtained from the /etc/passwd and the /etc/shadow file as well if shadow is enabled. The account component performs the task of establishing the status of the user's account and password based on the following shadow elements: expire, last_change, max_change, min_change, warn_change. In the case of the latter, it may offer advice to the user on changing their password or, through the PAM_AUTHTOKEN_REQD return, delay giving service to the user until they have established a new password. The entries listed above are documented in the shadow(5) manual page. Should the user's record not contain one or more of these entries, the corresponding shadow check is not performed. The authentication component performs the task of checking the users credentials (password). The default action of this module is to not permit the user access to a service if their official password is blank. A helper binary, unix_chkpwd(8), is provided to check the user's password when it is stored in a read protected database. This binary is very simple and will only check the password of the user invoking it. It is called transparently on behalf of the user by the authenticating component of this module. In this way it is possible for applications like xlock(1) to work without being setuid-root. The module, by default, will temporarily turn off SIGCHLD handling for the duration of execution of the helper binary. This is generally the right thing to do, as many applications are not prepared to handle this signal from a child they didn't know was fork()d. The noreap module argument can be used to suppress this temporary shielding and may be needed for use with certain applications. The password component of this module performs the task of updating the user's password. The session component of this module logs when a user logins or leave the system. Remaining arguments, supported by others functions of this module, are silently ignored. Other arguments are logged as errors through syslog(3). OPTIONS
debug Turns on debugging via syslog(3). audit A little more extreme than debug. nullok The default action of this module is to not permit the user access to a service if their official password is blank. The nullok argument overrides this default and allows any user with a blank password to access the service. nullok_secure The default action of this module is to not permit the user access to a service if their official password is blank. The nullok_secure argument overrides this default and allows any user with a blank password to access the service as long as the value of PAM_TTY is set to one of the values found in /etc/securetty. try_first_pass Before prompting the user for their password, the module first tries the previous stacked module's password in case that satisfies this module as well. use_first_pass The argument use_first_pass forces the module to use a previous stacked modules password and will never prompt the user - if no password is available or the password is not appropriate, the user will be denied access. nodelay This argument can be used to discourage the authentication component from requesting a delay should the authentication as a whole fail. The default action is for the module to request a delay-on-failure of the order of two second. use_authtok When password changing enforce the module to set the new password to the one provided by a previously stacked password module (this is used in the example of the stacking of the pam_cracklib module documented below). not_set_pass This argument is used to inform the module that it is not to pay attention to/make available the old or new passwords from/to other (stacked) password modules. nis NIS RPC is used for setting new passwords. remember=n The last n passwords for each user are saved in /etc/security/opasswd in order to force password change history and keep the user from alternating between the same password too frequently. shadow Try to maintain a shadow based system. md5 When a user changes their password next, encrypt it with the MD5 algorithm. bigcrypt When a user changes their password next, encrypt it with the DEC C2 algorithm. sha256 When a user changes their password next, encrypt it with the SHA256 algorithm. If the SHA256 algorithm is not known to the crypt(3) function, fall back to MD5. sha512 When a user changes their password next, encrypt it with the SHA512 algorithm. If the SHA512 algorithm is not known to the crypt(3) function, fall back to MD5. blowfish When a user changes their password next, encrypt it with the blowfish algorithm. If the blowfish algorithm is not known to the crypt(3) function, fall back to MD5. rounds=n Set the optional number of rounds of the SHA256, SHA512 and blowfish password hashing algorithms to n. broken_shadow Ignore errors reading shadow information for users in the account management module. minlen=n Set a minimum password length of n characters. The default value is 6. The maximum for DES crypt-based passwords is 8 characters. obscure Enable some extra checks on password strength. These checks are based on the "obscure" checks in the original shadow package. The behavior is similar to the pam_cracklib module, but for non-dictionary-based checks. The following checks are implemented: Palindrome Verifies that the new password is not a palindrome of (i.e., the reverse of) the previous one. Case Change Only Verifies that the new password isn't the same as the old one with a change of case. Similar Verifies that the new password isn't too much like the previous one. Simple Is the new password too simple? This is based on the length of the password and the number of different types of characters (alpha, numeric, etc.) used. Rotated Is the new password a rotated version of the old password? (E.g., "billy" and "illyb") Invalid arguments are logged with syslog(3). MODULE TYPES PROVIDED
All module types (account, auth, password and session) are provided. RETURN VALUES
PAM_IGNORE Ignore this module. EXAMPLES
An example usage for /etc/pam.d/login would be: # Authenticate the user auth required pam_unix.so # Ensure users account and password are still active account required pam_unix.so # Change the users password, but at first check the strength # with pam_cracklib(8) password required pam_cracklib.so retry=3 minlen=6 difok=3 password required pam_unix.so use_authtok nullok md5 session required pam_unix.so SEE ALSO
pam.conf(5), pam.d(5), pam(7) AUTHOR
pam_unix was written by various people. Linux-PAM Manual 05/31/2011 PAM_UNIX(8)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy