LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-27-2004, 12:01 PM   #1
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Rep: Reputation: 30
Need help with remember=10 option


I've been trying to use the "remember" option to pam_unix.so ... but it isn't behaving correctly. Here is my /etc/pam.d/passwd file:

Code:
#%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

auth        required      /lib/security/pam_env.so
auth	    required 	  /lib/security/pam_tally.so onerr=fail no_magic_root
auth        sufficient    /lib/security/pam_unix.so likeauth nullok
auth        required      /lib/security/pam_deny.so

account     sufficient    /lib/security/pam_succeed_if.so uid < 100
account     required      /lib/security/pam_unix.so
account	    required	  /lib/security/pam_tally.so deny=5 no_magic_root reset

password    requisite     /lib/security/pam_cracklib.so minlen=8 retry=5 dcredit=-1 lcredit=-1 ucredit=-1 ocredit=-1
password    sufficient    /lib/security/pam_unix.so nullok use_authtok md5 shadow nis remember=10
password    required      /lib/security/pam_deny.so

session     required      /lib/security/pam_limits.so
session     required      /lib/security/pam_unix.so
When I login as "testing" and type "passwd" I type my current password and then I type my new password 2 times. I get this output when I type in a brand new password ... I also get this output when I type in a previous password:

Code:
[testing@xxxx testing]$ passwd
Changing password for user testing.
Changing password for testing
(current) UNIX password: 
New UNIX password: 
Retype new UNIX password: 
Password has been already used. Choose another.
Password has been already used. Choose another.
Password has been already used. Choose another.
passwd: Authentication token manipulation error
The password I typed in has not already been used.

When I take out the "remember" option I can change the password. I've also experimented with tacking the "remember" option onto the "auth" pam_unix section and onto the "account" pam_unix section with no luck.

Additionally ... the pam_tally.so entry does not lock out my user after 5 failed attempts.

What am I doing wrong? Any help would be appreciated ;-)

-- Tony

Last edited by tonyfreeman; 10-27-2004 at 12:03 PM.
 
Old 10-27-2004, 03:57 PM   #2
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Original Poster
Rep: Reputation: 30
ANWSER to remember=10 problem

OK ... the answer to my problem is to manually touch a file called /etc/security/opasswd

Now pam.d remembers the old passwords and I don't get any of the errors I noted above.

Thanks goes to Neowulf in his post and follow-ups that he made :-)

Now ... the next problem to solve is the tally thing. I can still login after making 7 or more failed attempts.

-- --------- UPDATE ANSWER ----------- --

OK ... the answer to the tally thing is to first touch a file called /var/log/faillog. Then take out the tally entries in the "passwd" (because they do not work in the passwd file) and put them into the /etc/pam.d/system-auth file.

The system-auth file WILL get overwritten if you happen to use the GUI at a later date ... so you should also put the tally lines in /etc/pam.d/login and /etc/pam.d/sshd .... I wonder where else?

I now have tally working correctly and the remember thing working just fine ;-)

-- Tony

Last edited by tonyfreeman; 10-28-2004 at 09:10 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't quite remember... oldstinkyfish Linux - Software 4 06-12-2005 02:42 PM
i can remember when .. .... ... .. ... .. . t3gah General 11 06-01-2005 08:10 PM
Get LILO to remember last boot option underberg Linux - General 9 03-30-2005 04:27 AM
@#$@# I can't remember odious1 Linux - General 1 10-29-2003 09:27 AM
for those of you that remember--- »» paladins_r_1 Linux - Newbie 2 10-05-2003 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration