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-01-2012, 04:11 PM   #1
Erinmcc
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
question on writting a program


Hello everyone,I am new to linux and these boards.I have a question and have tried in various places to find the answer. I am writing a program for a class that will have users change their passwords, I know this sounds easy, but I have never written a program before. I believe I have to do this in /etc/login.defs, that is where the time parameters are written, but I cannot find : Do you need to do this for every user? is there a way to have it effect all users? I know you can add it to default when adding a user, but cannot find anything on having it become effective for all. Even if you could point me in the right direction in would be very helpful, and I would be very gratefull. I just installed fedora on a computer I have so I can try to learn hands on as well as in class, am I on the correct track?
Thanks everyone,
 
Old 02-01-2012, 04:18 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
What the program will do ?
 
Old 02-01-2012, 05:08 PM   #3
rustek
Member
 
Registered: Jan 2010
Location: Melbourne, IA, USA
Distribution: Ubuntu
Posts: 93

Rep: Reputation: 8
/etc/login.defs is used when you create a new user.

I know it's bad form to say rtfm, but in this case I think you would benefit from reading the manual page for usermod.
Code:
man usermod
 
Old 02-01-2012, 08:07 PM   #4
Erinmcc
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
The program should let a user know 5 days in advance that their password is expiring, and it should keep track the length of time before it gets changed like 30 days, . this is what I think so far
su - (to go to root)
/etc/login.defs
but then I am not sure, do you have to go into each seperate user and then add the password parameters? I also read something that said you have to go to
/etc/shadow to make the changes, I thought shadow was encrypted , so I am a little confused! sorry I am probably not as clear as I should be, but I am a little confused.
 
Old 02-01-2012, 09:03 PM   #5
cmgeo
LQ Newbie
 
Registered: Oct 2011
Location: India
Distribution: Win 7, Debian Squees, Slackware
Posts: 26

Rep: Reputation: Disabled
Hello

instead of programming, if you are using kde, i suggest you try

Code:
kuser
and set password expiry date.
 
Old 02-01-2012, 11:35 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,295

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
/etc/login.defs is the default setting for all newly created users. http://linux.die.net/man/5/login.defs
To change the settings for an individual user, man chage http://linux.die.net/man/1/chage
 
Old 02-07-2012, 08:51 PM   #7
Erinmcc
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Smile thank you for direction

Thank you for the help, and the direction I appreciate it very much.
Thanks again
Erin
 
  


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] Writting a C++ program using Netbeans and keep getting error about finding my header cuthbertmd1 Programming 2 02-14-2011 06:43 AM
writting a program knockout Linux - Software 4 04-27-2006 05:18 PM
Writting an OS in C++ makko Programming 2 08-27-2005 07:27 AM
Is a file in writting stephnane Linux - General 2 07-30-2004 09:39 PM
Writting my first C program in linux micxz Linux - Software 11 03-14-2003 03:38 AM


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