LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question on writting a program (https://www.linuxquestions.org/questions/linux-newbie-8/question-on-writting-a-program-927008/)

Erinmcc 02-01-2012 04:11 PM

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, :newbie:

Cedrik 02-01-2012 04:18 PM

What the program will do ?

rustek 02-01-2012 05:08 PM

/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

Erinmcc 02-01-2012 08:07 PM

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.

cmgeo 02-01-2012 09:03 PM

Hello

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

Code:

kuser
and set password expiry date.

chrism01 02-01-2012 11:35 PM

/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

Erinmcc 02-07-2012 08:51 PM

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


All times are GMT -5. The time now is 11:45 AM.