- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Password expiry notification script
Operating System - HP-UX
1753481
Members
5172
Online
108794
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2010 03:15 AM
тАО03-04-2010 03:15 AM
Password expiry notification script
Hi,
I am looking for password aging script which notify through email. O.S version is "HP-UX B.11.31 U ia64".
I am looking for password aging script which notify through email. O.S version is "HP-UX B.11.31 U ia64".
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2010 06:57 AM
тАО03-04-2010 06:57 AM
Re: Password expiry notification script
Hi,
Check the folowing forum entry:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1267714548280+28353475&threadId=1403117
Hope it helps.
Cheers
- Thomas
Check the folowing forum entry:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1267714548280+28353475&threadId=1403117
Hope it helps.
Cheers
- Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2010 08:12 AM
тАО03-04-2010 08:12 AM
Re: Password expiry notification script
Shalom,
passwd -sa
Generates a pretty nice report.
You can also configure the system to notify users X number of days before expiration. See the man page for passwd for details.
SEP
passwd -sa
Generates a pretty nice report.
You can also configure the system to notify users X number of days before expiration. See the man page for passwd for details.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2010 05:51 PM
тАО03-04-2010 05:51 PM
Re: Password expiry notification script
Following is a crude one. It works on Solaris running nis+
It is set to run once each night via cron.
more check_passwd_expiration
#!/bin/sh
#rsj 01/16/2003
#this script is intended to be ran from a cron job.
#It will email user warnings when their passwd is getting
#close to expiration.
mail_msg()
{
rmail $1 << EOF
Subject: $2
From: kishore
$1 $2
EOF
}
NDAYS=`/usr/bin/perl -e 'printf("%d\n", time / (3600 * 24))'`
echo NDAYS = $NDAYS
for user in `niscat -M passwd.org_dir | awk -F: '{printf("%s:%s:%s:%s:%s:%s\n", $1, $2, $8, $9, $10, $11)}'`
do
#echo user = $user
name=`echo $user | cut -d: -f1`
passwd=`echo $user | cut -d: -f2`
lastchg=`echo $user | cut -d: -f3`
min=`echo $user | cut -d: -f4`
max=`echo $user | cut -d: -f5`
warn=`echo $user | cut -d: -f6`
if [ "$max" != -1 -a "$passwd" != "*LK*" ]; then
if [ "$max" = "" ]; then
echo "invalid value of max for $name"
max=-1
fi
if [ "$lastchg" = "" ]; then
echo "invalid value of lastchg for $name"
lastchg=0
fi
#echo info = $name:$lastchg:$min:$max:$warn:$delta
delta=`expr $NDAYS - $lastchg`
expire=`expr $max - $delta`
if [ $expire -le 0 ]; then
echo info = $name:$lastchg:$min:$max:$warn:$delta
echo " Warning your passwd has expired"
mail_msg $name "Your passwd has expired"
elif [ $expire -le $warn ]; then
echo info = $name:$lastchg:$min:$max:$warn:$delta
echo " Warning passwd will expire in $expire days"
mail_msg $name "Warning your passwd expires in $expire days"
fi
fi
#else
#echo no expire for $name:$lastchg:$min:$max:$warn
#fi
done
It is set to run once each night via cron.
more check_passwd_expiration
#!/bin/sh
#rsj 01/16/2003
#this script is intended to be ran from a cron job.
#It will email user warnings when their passwd is getting
#close to expiration.
mail_msg()
{
rmail $1 << EOF
Subject: $2
From: kishore
$1 $2
EOF
}
NDAYS=`/usr/bin/perl -e 'printf("%d\n", time / (3600 * 24))'`
echo NDAYS = $NDAYS
for user in `niscat -M passwd.org_dir | awk -F: '{printf("%s:%s:%s:%s:%s:%s\n", $1, $2, $8, $9, $10, $11)}'`
do
#echo user = $user
name=`echo $user | cut -d: -f1`
passwd=`echo $user | cut -d: -f2`
lastchg=`echo $user | cut -d: -f3`
min=`echo $user | cut -d: -f4`
max=`echo $user | cut -d: -f5`
warn=`echo $user | cut -d: -f6`
if [ "$max" != -1 -a "$passwd" != "*LK*" ]; then
if [ "$max" = "" ]; then
echo "invalid value of max for $name"
max=-1
fi
if [ "$lastchg" = "" ]; then
echo "invalid value of lastchg for $name"
lastchg=0
fi
#echo info = $name:$lastchg:$min:$max:$warn:$delta
delta=`expr $NDAYS - $lastchg`
expire=`expr $max - $delta`
if [ $expire -le 0 ]; then
echo info = $name:$lastchg:$min:$max:$warn:$delta
echo " Warning your passwd has expired"
mail_msg $name "Your passwd has expired"
elif [ $expire -le $warn ]; then
echo info = $name:$lastchg:$min:$max:$warn:$delta
echo " Warning passwd will expire in $expire days"
mail_msg $name "Warning your passwd expires in $expire days"
fi
fi
#else
#echo no expire for $name:$lastchg:$min:$max:$warn
#fi
done
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP