LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-21-2008, 04:16 PM   #1
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59
Blog Entries: 1

Rep: Reputation: 15
Disable users after a specific time period


Hello all,
How to disable/lock user accounts after a specific time period. For example 90 days. The user account should be locked in every 90 days. Then only th root user can unlock it.

Thanks in advance
 
Old 12-21-2008, 04:40 PM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
root@bicycle:/home/drakeo# usermod
usage: usermod [-u uid [-o]] [-g group] [-G group,...]
[-d home [-m]] [-s shell] [-c comment] [-l new_name]
[-f inactive] [-e expire ] [-p passwd] [-L|-U] name
 
Old 12-21-2008, 04:58 PM   #3
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: 15
How to automate

Thanks Drakeo.
But my question is to get it automated. The user account should expire in every 90 days. Is there any way ?
 
Old 12-21-2008, 04:59 PM   #4
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Will a cronjob work here ?
 
Old 12-21-2008, 06:35 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Maybe some variation of the ideas in this thread will help

http://www.linuxquestions.org/questi...ghlight=passwd
 
Old 12-21-2008, 06:46 PM   #6
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Thanks Billy. Here login.defs plays with PASSWORD only. The exact requirement in my case is to lock out the account, not just the password. Means the account should be locked on the 90th day even if the password has been reset at 80th day or at 89th. What will do the trick for this to work ?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 06:22 PM
MPlayer: Recording specific time period of audio stream nazarioz Linux - Newbie 7 06-02-2005 10:47 PM
How to Disable Gnome from accessing sound period? schurt Linux - Software 2 08-23-2004 10:03 AM
Running a program for a specific period of time CaptainHowdy Linux - Software 2 08-22-2004 08:02 PM
Only starting command in a specific time period jeroenvrp Linux - Software 3 07-21-2004 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration