The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Terminal-specific characters in password PittWolfBW Shell Programming and Scripting 5 04-07-2008 07:08 AM
Password without numeric characters drchris SUN Solaris 3 01-18-2008 11:04 AM
verify sudo password mdpalow Shell Programming and Scripting 0 12-20-2007 10:53 PM
How to echo password characters mukluk UNIX for Dummies Questions & Answers 4 09-12-2005 07:34 AM
user Id vs Password Cerberus UNIX for Dummies Questions & Answers 2 09-26-2001 04:03 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-17-2008
amitpansuria amitpansuria is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 91
password verification verify password of a user for only first 8 characters

Helo ,
I m using linux pam library for user and its password authentication.
I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me

$ su - ram
Password:
You are required to change your password immediately (root enforced)
Changing password for ram
(current) UNIX password:
I m giving my current passwd

(new) Password :

I m giving my new passwd of 10 characters.

Now i m log off and again login as that user

Now when I give my password more only first 8 characters then also It allows me to login

how come this happen?

I also observed that it verify the password for first 8 characters.

can you tell me how to overcome this problem.

Regards,
Amit
  #2 (permalink)  
Old 10-17-2008
nitin's Avatar
nitin nitin is offline
Registered User
  
 

Join Date: Aug 2001
Location: Toronto, ON
Posts: 88
Check this file:
/etc/pam.d/common-password

Look for:
password required pam_unix.so nullok obscure min=4 max=8 md5

Linux systems have 256 character limit. Also, you can change and/or extend the limit to 10 characters in Unices (I think!).

HTH,


Sorry for all these edits....
Nitin

Last edited by nitin; 10-17-2008 at 12:45 PM..
  #3 (permalink)  
Old 10-20-2008
amitpansuria amitpansuria is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 91
Quote:
Originally Posted by nitin View Post
Check this file:
/etc/pam.d/common-password

Look for:
password required pam_unix.so nullok obscure min=4 max=8 md5

Linux systems have 256 character limit. Also, you can change and/or extend the limit to 10 characters in Unices (I think!).

HTH,


Sorry for all these edits....
Nitin
Hi nitin thx for reply.

I have check thhe entry of file passwd in /etc/pam.d . the entrty for this is:

#%PAM-1.0
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth


so how do I change passwd limit
  #4 (permalink)  
Old 10-20-2008
amitpansuria amitpansuria is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 91
Quote:
Originally Posted by amitpansuria View Post
Hi nitin thx for reply.

I have check thhe entry of file passwd in /etc/pam.d . the entrty for this is:

#%PAM-1.0
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth


so how do I change passwd limit
also see my /etc/pam.d/system-auth entry are given bewlo

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required /lib/security/$ISA/pam_env.so
auth sufficient /lib/security/$ISA/pam_unix.so likeauth nullok
auth required /lib/security/$ISA/pam_deny.so

account required /lib/security/$ISA/pam_unix.so
account sufficient /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet
account required /lib/security/$ISA/pam_permit.so

password requisite /lib/security/$ISA/pam_cracklib.so retry=3
password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password required /lib/security/$ISA/pam_deny.so

session required /lib/security/$ISA/pam_limits.so
session required /lib/security/$ISA/pam_unix.so
  #5 (permalink)  
Old 10-21-2008
nitin's Avatar
nitin nitin is offline
Registered User
  
 

Join Date: Aug 2001
Location: Toronto, ON
Posts: 88
Sorry buddy for the delayed response. Can you do an ls -l on this dir:
/etc/pam.d
I'm looking for /etc/pam.d/common-password file. Anyhow, I'm guessing that this line in /etc/pam.d/system-auth may be the key:
Code:
 password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
I'll try to find out more on it.

-Nitin
  #6 (permalink)  
Old 10-21-2008
nitin's Avatar
nitin nitin is offline
Registered User
  
 

Join Date: Aug 2001
Location: Toronto, ON
Posts: 88
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
  #7 (permalink)  
Old 10-22-2008
amitpansuria amitpansuria is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 91
Quote:
Originally Posted by nitin View Post
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
Hi Nitin thx for your reply.

/etc/pam.d/passwd file contains following(its passwd file not common-passwd)

#%PAM-1.0
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth


#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required /lib/security/$ISA/pam_env.so
auth sufficient /lib/security/$ISA/pam_unix.so likeauth nullok
auth required /lib/security/$ISA/pam_deny.so

account required /lib/security/$ISA/pam_unix.so
account sufficient /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet
account required /lib/security/$ISA/pam_permit.so

password requisite /lib/security/$ISA/pam_cracklib.so retry=3
password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password required /lib/security/$ISA/pam_deny.so

session required /lib/security/$ISA/pam_limits.so
session required /lib/security/$ISA/pam_unix.so




My problem is that suppose create a user and give a 12 character password . It will accept this password.

But when I logg off and again login and now I give first 8 character then only It will accept password. So it menas it validates only first 8 character.

yr help will be highly appreciated.
Regards,
Amit
A
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0