[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: recommendations for password management tool



On Wednesday 22 February 2006 13:51, Bill Tangren wrote:
> Miner, Jonathan W (CSC) (US SSA) wrote:
> > Use the native passwd tool... according to the man page:
> > 
> >        -x     This will set the maximum password lifetime,  in  days,  if  the
> >               user’s  account  supports password lifetimes.  Available to root
> >               only.
> > 
> > 
> > for u in `cut -d: -f1 /etc/passwd`; do
> >   passwd -x 90 $u
> > done
> > 
> > 
> > -----Original Message-----
> > From:	redhat-list-bounces redhat com on behalf of Bill Tangren
> > Sent:	Wed 02/22/2006 04:20 PM
> > To:	General Red Hat Linux discussion list
> > Cc:	
> > Subject:	recommendations for password management tool
> > 
> > I'm looking for a user password management tool that will allow me to alter 
> > sp_max in /etc/shadow, the number of days before a change is required in the 
> > password. I have the set to 180, and I want to set it to 90 for all my users. 
> > I've googled but came up empty. Webmin (which uses usermin) doesn't do this, as 
> > far as I can tell.
> > 
> > Thanks!
> > Bill Tangren
> > 
> > 
> 
> Thanks for the script, though I am unclear as to how this will affect non-user 
> accounts, like ident, squid, apache, etc.
> 
> The man page says "This will set the maximum password lifetime, in days,  if 
> the  user's  account supports password lifetimes."
> 
> I was hoping for something a little more interactive than that, though, as some 
> people changed their passwords recently, and some not so much. I didn't want to 
> immediately cut off some users because they changed their password >90 days ago.
> 
> 
> Thanks again.

for name in `egrep "^[[:alnum:]]+:[[:alnum:]$]" /etc/shadow`; do chage -d `date +%Y-%m-%d` -M -90 `echo $name | awk -F : '{ print $1 }'` ; done

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]