Operating System - Linux
1752810 Members
5737 Online
108789 Solutions
New Discussion юеВ

Re: Setting expiry dates for users in linux (redhat and suse)

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Setting expiry dates for users in linux (redhat and suse)

Hi All,

I am using Redhat ES 4 and Suse EL 10.

How to set the expiry dates for users in linux?
6 REPLIES 6
macosta
Trusted Contributor
Solution

Re: Setting expiry dates for users in linux (redhat and suse)

Check the man page for the "chage" command to change existing users. Some parameters can also be set when using the "useradd" command (such as expiry.)
Nuwan Alwis
Valued Contributor

Re: Setting expiry dates for users in linux (redhat and suse)

Hi Kumar
"chage" is the command for change time of account activation.
Hakki Aydin Ucar
Honored Contributor

Re: Setting expiry dates for users in linux (redhat and suse)

This is Linux Redhat
chage - change user password expiry information

Do you mean with Setting expiry dates for users ;
password aging activation OR account expiration ?
Hakki Aydin Ucar
Honored Contributor

Re: Setting expiry dates for users in linux (redhat and suse)

The followings bunch of the Management Commands on users:

useradd
usermod
userdel
adduser
chage
getent
Hakki Aydin Ucar
Honored Contributor

Re: Setting expiry dates for users in linux (redhat and suse)

And besides, from my notes:

You can use the chage command to manage the expiration date of a password. Password aging information is stored in the /etc/shadow file. The associated chage switch, where available, is shown with each description entry.

For example, if you wanted to require that user test1 keep a password for at least two days, use the chage test1 -m 2 command.

dirk dierickx
Honored Contributor

Re: Setting expiry dates for users in linux (redhat and suse)

see following sources of information:

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Security_Guide/s3-wstation-pass-org-age.html

for setting expiry rules when creating new users take a look at the /etc/login.defs file.