LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-23-2013, 02:31 AM   #1
74razor
Member
 
Registered: Dec 2012
Posts: 39

Rep: Reputation: Disabled
Want to create a user account and message to change password


Very new to the server environment and have a question regarding user accounts. I'm using CentOS 6.4

Is it possible to create a user account, and have that user messaged that they need to change their password before it expires? I see in the login.defs file there is a warning age timer. Is it possible to incorporate that into a message to the user?

Reason I ask is because I know in Windows you can have a user prompted that their password will expire in x amount of days.

Can I do the same thing in CentOS? I assume yes, but not sure how to find that option. I see in the passwd command man file that there is a -w option that sends a warning. I'm trying it on my test virtual machine and I don't get any prompts or warnings.

any help is appreciated.
 
Old 10-23-2013, 03:00 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Normaly users get a info about password expiration when they log in. Also I'm not sure if this is only on terminal or also over ssh. Should be on both. But definitely depends on the shell which way to go about extra notifications.

Might be nice to know what you did with the -w option? Did you also set an expire date? On my debian box here the expires time is never. So the warning is quite hard to reach. Maybe if set to zero.

So to test things. Set a password expires time with chage and login on another terminal. See if you get a hint. Use a nother session so you don't actually have to change your password.

Here are some links about the subject
http://serverfault.com/questions/118...ring-passwords

http://www.cyberciti.biz/tips/settin...xpiration.html
 
1 members found this post helpful.
Old 10-23-2013, 02:59 PM   #3
manoj_hanse
Member
 
Registered: Mar 2008
Posts: 48

Rep: Reputation: 1
Hello 74razor,

Use Zenity along with Shell script and cron.

https://help.gnome.org/users/zenity/stable/info.html.en
 
Old 10-23-2013, 06:57 PM   #4
74razor
Member
 
Registered: Dec 2012
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Normaly users get a info about password expiration when they log in. Also I'm not sure if this is only on terminal or also over ssh. Should be on both. But definitely depends on the shell which way to go about extra notifications.

Might be nice to know what you did with the -w option? Did you also set an expire date? On my debian box here the expires time is never. So the warning is quite hard to reach. Maybe if set to zero.

So to test things. Set a password expires time with chage and login on another terminal. See if you get a hint. Use a nother session so you don't actually have to change your password.

Here are some links about the subject
http://serverfault.com/questions/118...ring-passwords

http://www.cyberciti.biz/tips/settin...xpiration.html
Thank you for the help! This got it working. I was having a problem because my input for last password change was set for tomorrow, instead of today. When I changed that value to today, it gave me a message as soon as I logged in as the user. I also used passwd -w 7 <username>.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How does password change works for Normal user account in linux LittleMaster Linux - Server 3 10-05-2013 02:48 PM
RHEL 5 - User can't change password for OpenLDAP account cnzj Linux - Server 10 01-18-2011 07:09 PM
Change_passwd plugin for SquirrelMail does not change user account password kaplan71 Linux - Software 0 04-18-2008 01:41 PM
Password Change in SquirrelMail did not propogate to user login account kaplan71 Linux - Software 0 03-28-2007 09:48 AM
Can unlock screen with root password in my user account - want to change this sm1 Linux - Newbie 2 07-24-2005 06:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:30 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