LinuxQuestions.org
Help answer threads with 0 replies.
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 03-18-2010, 12:10 AM   #1
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Set user account expire date


In Solaris
Quote:
#usermod -e 'September 18, 2010' username
Is this correct format to set expire the user account after 180 days?
Where is this information update?
 
Old 03-18-2010, 01:13 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by kirukan View Post
Is this correct format to set expire the user account after 180 days?
No, at least not my system. The usermod man page on my machine indicates that the date should be in the form of YYYY-MM-DD. eg 2010-09-18.

What does the usermod man page say on your system?

Evo2.
 
Old 03-18-2010, 01:17 AM   #3
sohail0399
Member
 
Registered: Oct 2008
Location: Pakistan, Islamabad
Distribution: CentOS, Fedora, Solaris
Posts: 154

Rep: Reputation: 23
In solaris it may work fine

You can also check this link
http://www.bga.org/~lessem/psyc5112/...usermod.1.html

At CentOS this formate does not give any error.
 
Old 03-18-2010, 01:25 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Original Poster
Rep: Reputation: 148Reputation: 148
Thanks evo and sohail, I believe that i have awareness to check the man page but i post this here to confirm whether the format is correct

Quote:
-e expire Specify the future date on which a login can
no longer be used; after this date, no user
will be able to access this login. This
option is useful for creating temporary
logins. You may type the value of the argu-
ment expire (which is a date) in any format
you like (except a Julian date). For exam-
ple, you may enter 10/6/90 or October 6,
1990. A value of `` ''
defeats the status of
the expired date.
 
Old 03-18-2010, 03:24 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Original Poster
Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by kirukan View Post
Where is this information update?
Got it, In /etc/shadow
Quote:
username: password:lastchg:min:max:warn:inactive:expire:flag

Last edited by kirukan; 03-18-2010 at 03:26 AM.
 
  


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
How do I set a user password to expire on a specific date? Linuxwho? Linux - Newbie 5 07-06-2009 02:40 PM
way to set user account expiration Drasylera Linux - Newbie 1 02-05-2009 10:18 AM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM
How to set quota to user account? Khmer Linux - Newbie 1 12-12-2005 12:21 AM
expire date in useradd ALInux Linux - Security 2 11-08-2005 09:30 AM


All times are GMT -5. The time now is 02:40 PM.

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