The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
root passwd expiration on AIX aixguy AIX 3 06-30-2009 04:03 AM
password expiration abdulaziz SUN Solaris 3 01-11-2008 04:23 AM
new pine user on pop3 acct larrinski UNIX for Dummies Questions & Answers 0 12-06-2005 02:15 AM
help using acct Peterh UNIX for Dummies Questions & Answers 3 08-28-2002 10:35 AM
using UNIX shell acct to get POP3 mail from multiple accts sean_oconnor UNIX for Dummies Questions & Answers 2 07-26-2001 11:36 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-13-2005
BG_JrAdmin BG_JrAdmin is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 141
user acct expiration

how can i tell on a solaris 9 if a user acct has an expiration date? and when that expuiration is.
  #2 (permalink)  
Old 07-13-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
The fifth field of the shadow file will contain number of days before account is locked (or suppose to be locked). Field 3 is the day the last change was made (either password was changed or account was locked). Field six is how many days to warn user of account lock before locking.

See the man page for shadow section 4
man -s 4 shadow
  #3 (permalink)  
Old 07-13-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
See C2 or enhanced security for perl script to check the date and other info.
  #4 (permalink)  
Old 07-13-2005
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
it is written in you /etc/shadow. columns are:
username: password:lastchg: min:max:warn: inactive:expire:flag

change it with usermod
for example:
usermod -e 9/12/5 pressy
means that the user pressy account expire on the 12 July 2005

be carefull! in your shadow the expire column is written in unixtime days (days since 1970's)


gP

Last edited by pressy; 07-13-2005 at 07:34 PM..
  #5 (permalink)  
Old 07-13-2005
BG_JrAdmin BG_JrAdmin is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 141
they want to know when the accounts are going to expire.

and i dont have smc.

is there a script somewhere that will tell me the exp date of an acct?
  #6 (permalink)  
Old 07-13-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
What's wrong with
passwd -s -a
  #7 (permalink)  
Old 07-15-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
passwd -s -a gives when the password was changed or the account was locked. Since he is looking for when an account will expire, he needs to 'do the math' for each. Possibly your datecalc can do that for him (I haven't looked at it in some time) with the output of passwd -s -a.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:04 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0