Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-03-2011, 11:15 AM   #1
Registered: Mar 2011
Posts: 31

Rep: Reputation: 0
password policy affecting root user

Hi all,

I am using pam module to set password policy in my SuSE linux machine. This is my /etc/pam.d/common-password file:

password required retry=3 minlen=8 dcredit=-1 lcredit=-1 ucredit=-1 ocredit=-1
password required use_authtok remember=3
password required use_authtok nullok

Now if root user tries to change the password of a normal user, giving the same password, it is throwing an error saying "Password has been already used. Choose another".

> passwd user1
> password1 (set successfully)
> passwd user1
> password1 (Password has been already used. Choose another)

This should not happen with the root user. So is there any explanation for this?
Thanks in advance
Old 08-03-2011, 11:44 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
password required use_authtok remember=3
This seems to answer your question: pam retains a history of passwords and won't allow you to reuse a password stored in that history. The default number of passwords to remember is 400, but the config line quoted above resets the number to 3.

You can read more about it

Scroll down to the section labeled Password History.

Last edited by bigrigdriver; 08-03-2011 at 11:45 AM.
Old 08-04-2011, 05:46 AM   #3
Registered: Mar 2011
Posts: 31

Original Poster
Rep: Reputation: 0
Yeah true.. but I thought all these policies will not be applicable for root user unless we specify it externally. I was trying to modify the user's password from root !!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GNOME: Gain privileges using current user's password instead of root's password maxkukartsev Fedora 5 02-10-2012 10:46 AM
Use pthread scheduling policy without root user papaLou Programming 1 01-20-2011 10:21 AM
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 04:30 PM
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 11:28 PM
password policy expiry in the user sammee Linux - Newbie 5 09-16-2008 09:51 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:05 AM.

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