hi
How can I set an account so that it expires at a particular date?
man chage
first I have to create user with useradd and than chage.
right?
Can I do it in one command?
If you are creating a new user, try adding this flag in useradd:
-e date
so I dont need to use chage right?
New user - set using useradd
Existing user - change with chage
how can I get the date as a parameter from the user in a specific format.
For example:
enter date:
if user enters 01-02-2008
it must be automatcally converted to 2008-02-01
because I need "yyyy-mm-dd" format