LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2012, 11:30 AM   #1
learner-linuxx
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
Redhat - How to set the automatic policy - change password upon first log in


Hello All,

I am new to Linux. I am trying to figure out on how to set a policy that forces the users to change their passwords upon first log in.

I know that we can do it by using "chage command". But is there a way that we can make this default so that we don't need to use "chage command" every time we create an user.

Thanks for your help.
 
Old 02-09-2012, 12:11 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I don't think it is, no. If it's really a hassle, why not just write a short script to run multiple commands at once?
 
Old 02-09-2012, 12:39 PM   #3
learner-linuxx
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Yeah, Writing a script that do all things together would be a best option. I though like there might be a variable that we can set in some config file that triggers the password change on first login. I will make it in script.

Thanks...
 
Old 02-09-2012, 01:49 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

Maybe this would be a point to check:
/etc/login.defs ( from here )
 
  


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
[SOLVED] Set password policy per-user using cracklib? j_h Linux - Security 5 12-09-2013 09:43 PM
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 03:30 PM
How to : Change Password Expiration Policy in Solaris avklinux Solaris / OpenSolaris 3 11-21-2008 12:37 PM
change password policy sunhui Linux - Software 2 08-11-2006 10:40 AM
Change password policy sunhui Linux - Software 7 08-02-2006 08:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:11 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
Open Source Consulting | Domain Registration