LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-03-2011, 10:15 AM   #1
satya123
Member
 
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 pam_cracklib.so retry=3 minlen=8 dcredit=-1 lcredit=-1 ucredit=-1 ocredit=-1
password required pam_pwhistory.so use_authtok remember=3
password required pam_unix2.so 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".

Example:
> 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, 10:44 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
password required pam_pwhistory.so 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 http://www.deer-run.com/~hal/sysadmin/pam_cracklib.html

Scroll down to the section labeled Password History.

Last edited by bigrigdriver; 08-03-2011 at 10:45 AM.
 
Old 08-04-2011, 04:46 AM   #3
satya123
Member
 
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 !!
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 PM.

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