LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   User login expiry date? (http://www.linuxquestions.org/questions/linux-security-4/user-login-expiry-date-33106/)

geekgrl 10-18-2002 03:13 AM

User login expiry date?
 
I know how to create users and apply expiration dates to those logins.
I also know how to modify those expiration dates.

But how do I find out what the expiration date for a given user login is?

unSpawn 10-18-2002 05:38 AM

chage -l <username>

geekgrl 10-20-2002 06:39 PM

Damn, thats a weird arse name for a program, even by *nix standards.
And how on earth would I have figured that one out on my own!?

thanks unSpawn.
Quote:

Originally posted by unSpawn
chage -l <username>

markus1982 10-21-2002 01:48 AM

How you could have figured that out?
Code:

[root@markus root]# apropos expiry
chage                (1)  - change user password expiry information

Wondering what apropros is?
Quote:

NAME
apropos - search the whatis database for strings

SYNOPSIS
apropos keyword ...

DESCRIPTION
apropos searches a set of database files containing short
descriptions of system commands for keywords and displays
the result on the standard output.

SEE ALSO
whatis(1), man(1).

geekgrl 10-21-2002 02:02 AM

like I'd have thought I using apropos? I've never even heard of it.
newbie here...
Quote:

Originally posted by markus1982
Code:

[root@markus root]# apropos expiry
chage                (1)  - change user password expiry information



markus1982 10-21-2002 02:25 AM

Well at least now you know this powerful command ... it helped me out like a damn lot already so ;)

Nice to see a geek girl here BTW ;)

geekgrl 10-21-2002 02:36 AM

yes. we're a rare breed. :cool:
Quote:

Originally posted by markus1982

Nice to see a geek girl here BTW ;)


rudydark 07-04-2011 06:08 AM

Greetings!

Sorry to add this on a quite ancient thread but it can be helpful. (And yet it is in the top hits on the search engines. So could be useful.)
Just good to know that on recent linux systems there is a shadow file and there is the last number. (Before the last ":" separator.) It is the number of days since 1970.jan.01 when the account is going to be expired. The preceding number is the number of days for the grace period in days for disabling the account. (The curious reader can find further useful info on the other relevant fields of the shadow file now on.)

(So - If you back up the shadow file you back up the expiry dates too. Other hand if there is a user who can read the shadow file you can create a script to find out the expiry date and even if it exists.)

Other hand: Many Thanks markus1982 for the apropos command. And Best Wishes for geekgrl asking for it! Best Wishes for You two!


All times are GMT -5. The time now is 03:23 AM.