how to force a user to change the password | Unix Linux Forums | Red Hat

  Go Back    


Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

how to force a user to change the password

Red Hat


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-17-2009
uxadmin007 uxadmin007 is offline
Registered User
 
Join Date: May 2009
Last Activity: 1 November 2010, 11:12 AM EDT
Posts: 27
Thanks: 13
Thanked 0 Times in 0 Posts
how to force a user to change the password

RHEL 5 update 4. How to force a user to change the password at his next logon.

Thanks in advance.
Sponsored Links
    #2  
Old 09-17-2009
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 27 August 2014, 1:31 PM EDT
Location: Saskatchewan
Posts: 19,264
Thanks: 773
Thanked 3,233 Times in 3,031 Posts
You can force a password to immediately expire with

Code:
chage -d 0 username

Sponsored Links
    #3  
Old 09-25-2009
arm_naja arm_naja is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 3 July 2014, 4:31 AM EDT
Posts: 59
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Corona688 View Post
You can force a password to immediately expire with

Code:
chage -d 0 username

why I'm not works.
when we use option -d , user cannot login(rhel5.2, ssh4.3).
    #4  
Old 09-25-2009
mark54g mark54g is offline Forum Advisor  
Registered User
 
Join Date: May 2008
Last Activity: 26 July 2013, 11:43 AM EDT
Location: Northeastern United States
Posts: 918
Thanks: 1
Thanked 61 Times in 58 Posts
Did they ever have a password before? If not, you need to create one for them. This will not force their first password.
Sponsored Links
    #5  
Old 09-28-2009
arm_naja arm_naja is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 3 July 2014, 4:31 AM EDT
Posts: 59
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mark54g View Post
Did they ever have a password before? If not, you need to create one for them. This will not force their first password.
It have password, but still not works. ???

==================
# grep ratcha /etc/passwd /etc/shadow
/etc/passwd:ratcha.c:x:510:500:System Admin:/home/ratcha.c:/bin/ksh
/etc/shadow:ratcha.c:$1$O1z5V6.2$en8cRSXbDS0VGAT/XHbEZ/:14515:7:90:7:::
# passwd -d ratcha.c
Removing password for user ratcha.c.
passwd: Success
#
# grep ratcha /etc/passwd /etc/shadow
/etc/passwd:ratcha.c:x:510:500:System Admin:/home/ratcha.c:/bin/ksh
/etc/shadow:ratcha.c::14515:7:90:7:::
# ssh ratcha.c@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is e6:6b:cd:ce:7c:c2:60:f5:22:f8:23:ac:f0:8b:ae:f6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
ratcha.c@localhost's password:
Permission denied, please try again.
ratcha.c@localhost's password:
Permission denied, please try again.
ratcha.c@localhost's password:
Permission denied (publickey,gssapi-with-mic,password).
=================
Sponsored Links
    #6  
Old 09-28-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 27 August 2014, 5:29 AM EDT
Location: /dev/ph
Posts: 4,786
Thanks: 63
Thanked 424 Times in 393 Posts
Chage -d should work. Can you log in as that user on the console?
Sponsored Links
    #7  
Old 09-29-2009
arm_naja arm_naja is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 3 July 2014, 4:31 AM EDT
Posts: 59
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by fpmurphy View Post
Chage -d should work. Can you log in as that user on the console?
User can log in to server normally.
But I want to test force them to change password at first login.

Why option -d not work for me ???
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
force to change password(by modifying /etc/shadow) tjay83 Shell Programming and Scripting 6 09-27-2008 07:56 AM
force to change password(shell script) tjay83 Shell Programming and Scripting 3 09-18-2008 11:16 PM
Force to change to a different password champion UNIX for Advanced & Expert Users 3 01-16-2003 12:01 PM
How to force user to change password at login? penguin-friend UNIX for Advanced & Expert Users 10 07-08-2002 10:46 AM
Force Password Change...RedHat 7.1 vancouver_joe UNIX for Advanced & Expert Users 1 02-22-2002 01:12 AM



All times are GMT -4. The time now is 04:58 PM.