LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 11-24-2008, 11:42 PM   #1
varunkant
Member
 
Registered: Jun 2008
Location: shimla
Distribution: redhat linux,Ubuntu 8.10
Posts: 41

Rep: Reputation: 15
Prompt 4 passwd change after every 3 months


Hello Everyone

Just a quickie question about PAM

how can we make linux to prompt for password change after every 3 months..

Thanks
 
Old 11-25-2008, 12:45 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
Will passwd -x do what you want?
 
Old 11-25-2008, 12:56 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,755
Blog Entries: 5

Rep: Reputation: Disabled
See the manpages for chage(1).
 
Old 11-26-2008, 08:10 AM   #4
varunkant
Member
 
Registered: Jun 2008
Location: shimla
Distribution: redhat linux,Ubuntu 8.10
Posts: 41

Original Poster
Rep: Reputation: 15
Hi

Thanks for that, but if i have 300 users in company , i cant do this for every user.
What i am looking for is a policy file somewhere in pam.d , which is universily defined for every user ( that they have to change password every 3 - 4 months )


Thanks for ur answer...
 
Old 11-26-2008, 08:35 AM   #5
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 449

Rep: Reputation: 33
Can't you just use the /etc/login.defs file? like:
Code:
PASS_MAX_DAYS 90
PASS_MIN_DAYS 1
PASS_WARN_AGE 7
 
Old 11-26-2008, 06:39 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,755
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by Acron_0248
Can't you just use the /etc/login.defs file?
He probably should update login.defs for new accounts, but - from the manpages for login.defs(5):
Quote:
PASS_MAX_DAYS, PASS_MIN_DAYS and PASS_WARN_AGE are only used at the
time of account creation. Any changes to these settings won’t affect
existing accounts.
---

Quote:
Originally Posted by varunkant
Thanks for that, but if i have 300 users in company , i cant do this for every user.
Sure you can.

%awk -F: '{print $1}' /etc/passwd > accounts-file

Hand-edit accounts-file to remove system accounts and any other exceptions - e.g. root (do not forget this step). Set up a for loop to iterate through all accounts in accounts-file and update their expirations via chage.

That's just one approach.
 
Old 11-26-2008, 07:09 PM   #7
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 449

Rep: Reputation: 33
Quote:
Originally Posted by anomie View Post
He probably should update login.defs for new accounts, but - from the manpages for login.defs(5):

Quote:
PASS_MAX_DAYS, PASS_MIN_DAYS and PASS_WARN_AGE are only used at the
time of account creation. Any changes to these settings won’t affect
existing accounts.
---
Ohh, I see, thanks for clarifying
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Passwd Format shipon_97 Linux - Newbie 1 01-09-2007 08:13 AM
Initial passwd change liguorir Linux - Software 0 09-24-2004 11:01 AM
need a script that can change the passwd bahadur Linux - Security 1 07-09-2004 05:07 AM
user can change passwd kelper Linux - Software 3 08-28-2003 04:17 AM
How to stop prompt for root passwd when dialing with kppp? aethereal Linux - Newbie 13 04-16-2002 08:31 AM


All times are GMT -5. The time now is 11:16 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration