Shell script to auto-change password before password expiry

From: Gold Sun (goldsun8_at_yahoo.com.sg)
Date: 04/25/05

  • Next message: Andreas Höschler: "Re: cron jobs no longer works"
    Date: Mon, 25 Apr 2005 16:13:23 +0800 (CST)
    To: sunmanagers@sunmanagers.org
    
    

    Hi,
     
    We have a job that would fail to send reports out if the root
    password expires :
     
     # passwd -s root
    root PS 03/23/05 0 30 21

    Above shows password will expire 30 days from 23 Mar.
     
    So we have to manually change it by "passwd root" &
    this will give us another 30 days.
     
    Would anyone care to contribute a shell script that will
    help reset the password every 28 days (as February has
    28 days) which I can put in the crontab or the script can
    checks for password expiry every day & the expiry is
    less than 2 days away, the script will change it.
     
    I will summarize.
     
    Thanks
    G Sun
     

     Yahoo! Mobile
    - Download the latest ringtones, games, and more!
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Andreas Höschler: "Re: cron jobs no longer works"

    Relevant Pages

    • Re: ssh root denied
      ... using an script via cron. ... you will need to regenerate the passwd. ... scripts, tar as root, transfer as, rebuild as root. ...
      (freebsd-questions)
    • IBM Informix Web DataBlade: Local root by design
      ... IBM Informix Web DataBlade: Local root by design ... Impact: Any user who can: 1) Save a Perl script anywhere on the server's ... admin right on any database can do it by loading the WDB module into ...
      (Bugtraq)
    • RE: Linux hacked
      ... I would also suggest using a simple script in the future that alerts ... Subject: Linux hacked ... To get back into your account you want to use, at the boot manager ... boot normally and you should be able to login as root with your new ...
      (Security-Basics)
    • Re: BSDstats v3.0 - The Security Rewrite
      ... The bsdstats script could easily pick up that entry and set ... a management machine, and that management machine only has ... Email is sent to root containing IDTOKEN= as generated by host, root forwards that to rpt@xxxxxxxxxxxx, rpt@xxxxxxxxxxxx sends back KEY= value ... second time, submits report values to root, root forwards that to rpt@xxxxxxxxxxxx ... ...
      (freebsd-questions)
    • Re: Great SWT Program
      ... from a terminal emulator and log in as root there. ... terminal-emulator windows open, ... The script, suid-root utility, or whatever would ... the command interpreter with root privileges ...
      (comp.lang.java.programmer)