Sponsored Content
Top Forums UNIX for Advanced & Expert Users password verification verify password of a user for only first 8 characters Post 302249518 by nitin on Tuesday 21st of October 2008 01:41:33 PM
Old 10-21-2008
I think I'm pretty sure that you can set the password limit here, in your /etc/pam.d/login file (you will have to add this line below):

Code:
 password   required   pam_unix.so nullok obscure min=4 max=8

You can change max value to whatever you want. Going through man pages, max is not documented, but the functionality is there. Also, before any changes make sure you backup your files.

-Nitin Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to echo password characters

Hi All, I was wondering, how can I echo password using a character such as '*' in unix? In my machine, password is not echoed, so it is only blank space when I enter any password. So, when I enter a command such as "lock", how can I set the echo character to "*" or something else for... (4 Replies)
Discussion started by: mukluk
4 Replies

2. Shell Programming and Scripting

verify sudo password

edited and removed (0 Replies)
Discussion started by: mdpalow
0 Replies

3. Solaris

Password without numeric characters

G'day guys, Just a simple question: Is it possible to set user's passwords without numeric characters? I prefer to have passwords as simple words, but when going through SMC, i get an error that the first six characters must contain at least 2 alphabetic and 1 numeric. Server is a Sun... (3 Replies)
Discussion started by: drchris
3 Replies

4. Shell Programming and Scripting

Terminal-specific characters in password

Good morning! I am using a shell script to back up user email files to a remote location. The problem is, one (and apparently more than one) users have the symbol "@" in their password. As you can see from the line: /sbin/mount_smbfs... (5 Replies)
Discussion started by: PittWolfBW
5 Replies

5. UNIX for Dummies Questions & Answers

printing password having special characters

Hi I have a password stored in a file (which is a user input) The password is having the special character $ say the password is pw$ord and is stored in the file pw_note I am using the following statement to store the passowrd in a variable $schema_pwd = `cat $dir/pwd_note` ; Now if i print... (4 Replies)
Discussion started by: ssuresh1999
4 Replies

6. Shell Programming and Scripting

how to remove the non : characters after the password in shadow file?

On SPARC Solaris 10. I set the app account so it's expired. I also want it so not required to change password at first login, I can do this by removing the numbers after the password in /etc/shadow. example using user1 The /etc/shadow file looks like this: user1:kOmcVXAImRTAY:0::::90:: ... (8 Replies)
Discussion started by: TKD
8 Replies

7. OS X (Apple)

OSX verify username and password in one line

I'm writing a script that has the need to verify the current user's username and password. I'm not entirely sure how to do this. I've read some things on "dscl" but am not sure that's the correct route for me to go. The one condition i have is that i really need to have the verification happen... (4 Replies)
Discussion started by: TheDrizzle
4 Replies

8. Shell Programming and Scripting

Random Password generator with 2 digits and 6 characters

I am using the below to random generate a password but I need to have 2 numeric characters and 6 alphabetic chars head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '' 6USUvqRB ------ Post updated at 04:43 PM ------ Any Help folks - Can the output be passed onto a sed command to... (9 Replies)
Discussion started by: infernalhell
9 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
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. 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. 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(8) AUTHOR
pam_unix was written by various people. Linux-PAM Manual 04/01/2010 PAM_UNIX(8)
All times are GMT -4. The time now is 10:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy