- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Account Security - password expiration report in H...
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО09-15-2003 12:28 PM
тАО09-15-2003 12:28 PM
-Russ Park
Here's the output:
thomp*** Expires in 64 Days on 11/19/2003 08:29 Period: 90
dadkh*** Expires in 69 Days on 11/24/2003 07:24 Period: 90
engla*** Expires in 72 Days on 11/27/2003 11:07 Period: 90
admir*** EXPIRED ON: 11/04/2002 09:32
hrisd*** EXPIRED ON: 05/13/2003 11:23
huffm*** EXPIRED ON: 03/13/2003 13:34
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 12:30 PM
тАО09-15-2003 12:30 PM
Re: Account Security - password expiration report in HP-UX
passwd -sa
It gives you the date of the last password change.
This is a start.
SEP
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
тАО09-15-2003 08:27 PM
тАО09-15-2003 08:27 PM
Re: Account Security - password expiration report in HP-UX
Maybe "logins" command could be useful.
" ...
-a Displays two account expiration fields. The fields show how long the account can be unused (in days) before it becomes inactive
and the date the account will expire. ..."
From "man logins".
Hope this helps.
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 08:47 PM
тАО09-15-2003 08:47 PM
Re: Account Security - password expiration report in HP-UX
(todays time+((password expiry time) - (todays time - last successfully changed password)))
Let me know if you like to have a copy of that program of try by yourself.
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 08:51 PM
тАО09-15-2003 08:51 PM
SolutionIf you are using a trusted system, then you may be able to make use of the following command:
# /usr/lbin/getprpw
Fields that may be relevant include:
exptm=90
spwchg=Tue Sep 16 14:38:21 2003
expwarn=7
This shows the passwords must be changed every 90days(exptm) & the last successful Password Change was Sep 16 2003.
The "expwarn" field shows the user will be warned 7 days prior to their password expiring.
The /usr/lbin/modprpw command can be used to modify many of these parameters.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 11:16 PM
тАО09-15-2003 11:16 PM
Re: Account Security - password expiration report in HP-UX
we use this script. It write in a file the username and number of days for password expiration.
Hope this help.
# Este script genera un listado en /etc/umios
# que contiene cada usuario y el tiempo que le queda
# para expirar la clave.
> /etc/umios
chmod 644 /etc/umios
ahora=`/usr/contrib/bin/perl -e 'printf "%d\n",time()'`
for i in `cat /etc/passwd | cut -d":" -f1`
do
letra=`echo $i|cut -c1`
#echo $i $letra
ultimocambio=`cat /tcb/files/auth/$letra/$i | awk -F "u_succhg#" ' {print $2}' | cut -d":" -f1
| grep -v ^$`
# echo $ultimocambio
let "dias=180 - (( $ahora - $ultimocambio ) / 86400) "
#echo $dias
echo $i"|"$dias >> /etc/umios
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2003 07:13 AM
тАО12-11-2003 07:13 AM
Re: Account Security - password expiration report in HP-UX
Seen your post. Could you allow me to have a copy of your progrsm. Passwd expiration.
Thanks
Darryl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2003 07:44 PM
тАО12-11-2003 07:44 PM
Re: Account Security - password expiration report in HP-UX
I've recently written a script to calculate te date the password wil expire on a non trusted system.
I use a script called calljd.sh which calculates the julian day of a date supplied to the script. (it can be found somewhere in this forum)
To find out password dates use passwd -a -s, it gives you the date the password is changed and also it gives you the time, in day's, it is valid.
If you have this you can calculate the current day in julian time and calculate the day the password wil expire.
This results in:
'time still valid' = 'expire date' - 'current date'
Kl@@s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2004 10:01 AM
тАО02-02-2004 10:01 AM
Re: Account Security - password expiration report in HP-UX
Thanks again for all your input...
OH - to the person who's code posted in spanish, I'd love to see the English version if possible!
-Russ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2004 06:07 PM
тАО02-04-2004 06:07 PM
Re: Account Security - password expiration report in HP-UX
we use this script. It write in a file the username and number of days for password expiration.
Hope this help.
# This script create a file named /etc/umios.
# The content of this file is the user login name and the
# number of days to password expiration
> /etc/umios
chmod 644 /etc/umios
# "ahora" is "now". This variable get the actual time
ahora=`/usr/contrib/bin/perl -e 'printf "%d\n",time()'`
# We have Trusted System activated, so we need to see
# user data in this directories estructres
# /tcb/files/auth/$first_leter_username/$username
# For all users, the $i get the user name
for i in `cat /etc/passwd | cut -d":" -f1`
do
# "letra" is the first leter of user name
letra=`echo $i|cut -c1`
# "ultimocambio" is lastchange. This variable get the time of last password change
ultimocambio=`cat /tcb/files/auth/$letra/$i | awk -F "u_succhg#" ' {print $2}' | cut -d":" -f1
| grep -v ^$`
# We create all users with 180 days of password expiration time, so
# we rest 180 days minus today mnus last change of password, and
# we get the number of days to next password change
let "dias=180 - (( $ahora - $ultimocambio ) / 86400) "
echo $i"|"$dias >> /etc/umios
done
========
I hope that all is clear "ahora" (sorry, now).