- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: INACTIVITY_MAXDAYS and wtmps
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
тАО06-10-2010 07:47 AM
тАО06-10-2010 07:47 AM
Thank you.
Solved! Go to Solution.
- Tags:
- wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2010 08:02 AM
тАО06-10-2010 08:02 AM
Re: INACTIVITY_MAXDAYS and wtmps
If the tracking were via the 'wtmp*' files then truncating it or removing it to stop all logging would break the security feature.
If you look at 'shadow(4)' --- the manpages --- you will see that the 'INACTIVITY_MAXDAYS' attribute is related to the 'inactivity'
field of the shadow password file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2010 09:44 AM
тАО06-10-2010 09:44 AM
SolutionThe question remains, how is the inactivity time tracked by the system?
In Trusted System Mode, the last login time of each user is stored in the /tcb/files/auth/
(This logic is probably embedded in the libraries that manage the /tcb files, so SAM and other tools are able to identify the inactivity-locked accounts whether they've already been explicitly flagged or not.)
As HP-UX is now migrating from Trusted System Mode to the industry-standard shadow passwords, a new place had to be found for those user-specific attributes that are incompatible with the shadow password file format. This place is /var/adm/userdb: see userdb(4) for more information.
Unfortunately the man page does not describe the contents of the userdb directly, but instead refers us to the /etc/security.dsc file. It lists all the data fields of the userdb... and indeed, one of them is the last login time.
The last login time is classified as an internal attribute in the userdb, so it is not displayed by the userdbget command unless you specifically request to view the internal attributes too. For example, the command "userdbget -i -u root" will display all the userdb information about the root user, including the time of the last login (in hexadecimal Unix epoch time format).
MK
- Tags:
- userdbget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2010 10:28 AM
тАО06-10-2010 10:28 AM
Re: INACTIVITY_MAXDAYS and wtmps
Matti provides a number of details that I missed. Thanks, Matti!
There is a detailed discussion of the 'userdb(4)' database and the commands for setting, getting and querying its contents, here, together with the manpages for 'userdb(4)' the commands themselves:
http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01944073/c01944073.pdf
As for the Epoch timestamps, as always, you can decipher these simply by doing:
# userdbget -iu root
root login_time=0x4c10ce06
# perl -le 'print scalar localtime(0x4c10ce06)'
Thu Jun 10 07:35:34 2010
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2010 07:49 AM
тАО06-11-2010 07:49 AM
Re: INACTIVITY_MAXDAYS and wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2010 08:15 AM
тАО06-11-2010 08:15 AM
Re: INACTIVITY_MAXDAYS and wtmps
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2010 12:13 PM
тАО06-11-2010 12:13 PM
Re: INACTIVITY_MAXDAYS and wtmps
I believe login time is kept even without the SecurityExt.
After installation of the bundle any accounts not used the past 45 days may be locked instantly.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com