- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Re: E-mail when account is about to expire
Operating System - Tru64 Unix
1748054
Members
4852
Online
108758
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
Go to solution
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
тАО01-12-2005 06:42 AM
тАО01-12-2005 06:42 AM
Greetings,
I've searched the forum but didn't find anything. I would think this to be something somebody would want.
Our DBAs complain that on occasion they try to log onto a server to find their account locked because the password expired. This happens because there are many servers and they often don't log onto a server for long periods of time.
What they want is to have an e-mail sent to them when the password of an account on a server is about to expire. Like a few days notice.
I was wondering if anyone had a script and/or program that would do this. We're running Tru64 V5.1B PK4. We have Enhanced Security enabled.
If there's no such script/program I was thinking of trying to write a script myself. Here's the basic logic. Any thoughts are welcomed.
1) Get the u_succhg for the account using edauth. This gives the last succesful change of the password.
2) Get the u_exp for the account. If it doesn't exist get it from the default record (edauth -d d -g default).
3) Add the 2 no.s together to get the time the password expires.
4) Somehow convert those seconds into a date. I know of one way with the commands:
echo "ctime 1100524315" | kdbx -k vmunix|tail -1
5) Finally compare that date with the current date to determine whether an e-mail shoud be sent.
Thanks,
Vic
I've searched the forum but didn't find anything. I would think this to be something somebody would want.
Our DBAs complain that on occasion they try to log onto a server to find their account locked because the password expired. This happens because there are many servers and they often don't log onto a server for long periods of time.
What they want is to have an e-mail sent to them when the password of an account on a server is about to expire. Like a few days notice.
I was wondering if anyone had a script and/or program that would do this. We're running Tru64 V5.1B PK4. We have Enhanced Security enabled.
If there's no such script/program I was thinking of trying to write a script myself. Here's the basic logic. Any thoughts are welcomed.
1) Get the u_succhg for the account using edauth. This gives the last succesful change of the password.
2) Get the u_exp for the account. If it doesn't exist get it from the default record (edauth -d d -g default).
3) Add the 2 no.s together to get the time the password expires.
4) Somehow convert those seconds into a date. I know of one way with the commands:
echo "ctime 1100524315" | kdbx -k vmunix|tail -1
5) Finally compare that date with the current date to determine whether an e-mail shoud be sent.
Thanks,
Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2005 08:56 AM
тАО01-12-2005 08:56 AM
Solution
Sounds about right. kdbx is a big hammer perhaps.
I would possibly use the perl localtime function to convert time in seconds to a date. And perl will happily do the math, subtract days, send mail, whatever.
Basic example:
perl -e '$day=86400; print scalar localtime(1100524315-5*$day)'
fwiw,
Hein.
I would possibly use the perl localtime function to convert time in seconds to a date. And perl will happily do the math, subtract days, send mail, whatever.
Basic example:
perl -e '$day=86400; print scalar localtime(1100524315-5*$day)'
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2005 01:27 AM
тАО01-14-2005 01:27 AM
Re: E-mail when account is about to expire
Hein,
Thanks for the logic review and the suggestion to use Perl to convert the time. I was able to write a script to do what I want and it seems to work.
Vic
Thanks for the logic review and the suggestion to use Perl to convert the time. I was able to write a script to do what I want and it seems to work.
Vic
There are 10 kinds of people, one that understands binary and one that doesn't.
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