Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-25-2008, 02:16 PM
|
#1
|
|
Member
Registered: Nov 2003
Posts: 703
Rep:
|
Locking out a user when password expires, but allowing them to change their password
Hi there --
Is there a way to lock out users whose passwords have expired, but allow them the capability to connect and immediately change the expired password?
|
|
|
|
06-25-2008, 05:10 PM
|
#2
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
No, because in order to connect you have to have a valid password.
-------------------
Steve Stites
|
|
|
|
06-25-2008, 05:49 PM
|
#3
|
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990
Rep:
|
jailbait's answer seems slightly simplified to me.
Linux normally uses PAM (pluggable authentication modules) to authenticate users, and you can do all sorts of weird and wonderful things, including getting terminal access and prompting for updated information if the password is out of date.
The problem is that you'd need to do quite a bit of programming to make that work, unless you can find a module that implements similar functionality already.
I think it may be easier to set up a web server that could allow the user to log in and change their system login password. I'm pretty sure you could set up an Apache webpage to authenticate a session user using the linux password through PAM, even bypassing the expiry date for the website but not for normal logins. But that's just one option of many.
A good starting point for further information might be the user authentication howto: http://www.linuxdocs.org/HOWTOs/User...OWTO/x101.html
|
|
|
|
06-27-2008, 12:11 PM
|
#4
|
|
Member
Registered: May 2007
Posts: 33
Rep:
|
We use pam on our redhat boxes but I don't know of any "temporarily let me in" module. If there is one, I would love to try that out.
I know that the /etc/shadow file allows you to set a "warning" time in # of days in the sixth field; we use 7 days. So as Joe-user logs in, he will get the reminder 7 days out that his password will expire and allow him to change it.
Format of the /etc/shadow is:
username  asswd:last:min:max:warn:expire:disable:reserved
If Joe-user chooses to continue to ignore this message every time he logs in, then after 7 days, he gets to go visit the sysadmin to change his password.
Last edited by legcard; 06-27-2008 at 12:14 PM.
|
|
|
|
06-27-2008, 01:02 PM
|
#5
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
Quote:
|
Originally Posted by kaplan71
Is there a way to lock out users whose passwords have expired, but allow them the capability to connect and immediately change the expired password?
|
Assuming I understand your question, you could also use:
# chage -M 999 -d 1 user_here
P.S. Be sure to read the chage(1) manpages and actually understand what that does (and how it could potentially affect system password policies you have in place) before using it.
-------------------------
Edit: After re-reading your question and this thread, it seems likely that I've misunderstood.
Last edited by anomie; 06-27-2008 at 01:04 PM.
|
|
|
|
06-27-2008, 07:12 PM
|
#6
|
|
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990
Rep:
|
To clarify: As I understand it, you want to give users the option to change their password without a full log-in session, if their password has expired.
Looking a bit further, GDM (the Gnome Display (Login) Manager) seems to have some sort of option to allow users to change their password after it has expired, and it does indeed use PAM.
See the second post on this page: http://bugzilla.gnome.org/show_bug.cgi?id=356109
Other posts talk about PAM prompting to change the user's password if it has expired. So it's definitely possible.
Perhaps someone who understands PAM can explain how to chain things together to make this happen?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:42 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|