Update: Shell script to auto-change password before password expiry

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

  • Next message: Daryl.Mitchell_at_us.o-i.com: "Re: where to get SUNWqlc driver for 2300 cards?"
    Date: Mon, 25 Apr 2005 23:15:22 +0800 (CST)
    To: sunmanagers@sunmanagers.org
    
    

    Hi,
     
    Missed out one criteria : that the password must not be
    something in clear text stored anywhere in the system
    otherwise this will not meet the security requirements.
     
    I just have a look at the crontab (left behind by the previous
    administrator) & believe it's one of the sendmail job that
    could not send the report out :
     
    1 * * * * /usr/local/mrtg/95.pl
    5 12 * * * /etc/init.d/sendmail start; /usr/local/mrtg/customer/sendmail.sh;sleep 10;/etc/init.d/sendmail stop
    # 0 10 1 * * /etc/init.d/sendmail start;cat /dev/null | mailx -s "Root Password on ab01bnf01ist5s5 about to expire, please escalate" gwasysop@abc.com;sleep 10;/etc/init.d/sendmail stop
    1 0 1 * * /etc/init.d/sendmail start; /usr/local/mrtg/customer/mailreport.sh;sleep 10;/etc/init.d/sendmail stop

     
    Thanks for any inputs
    G Sun

    Gold Sun <goldsun8@yahoo.com.sg> wrote:
    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!

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


  • Next message: Daryl.Mitchell_at_us.o-i.com: "Re: where to get SUNWqlc driver for 2300 cards?"

    Relevant Pages

    • 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)
    • I can not su to root on my Sun Solaris 9 (SPARC) box, even with the correct password
      ... I used the correct root password but still am not able to ... I have the following configured and running on my Sun box. ... I am using NIS / YP for my authentication and this Sun box is ... NOT neither running as an NIS master nor as an NIS slave server. ...
      (comp.unix.solaris)