- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: report to list locked accounts
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
Forums
Discussions
Discussions
Discussions
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
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
08-29-2005 02:32 AM
08-29-2005 02:32 AM
it is audit time again, or will be shortly. i have a trusted system on an HPUX11iv1 system and would a way to get a report of the locked accounts, short of touching every account and looking. has anyone written such a script that they would be willing to share.
thanks in advance.
michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 02:40 AM
08-29-2005 02:40 AM
Re: report to list locked accounts
do
stat=`getprpw -m lockout ${i}`
if [[ ${stat) != "0000000" ]]
then
echo "Account locked ${i}"
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 02:42 AM
08-29-2005 02:42 AM
Re: report to list locked accounts
Check this doc from the itrc database.
Document description: How to report inactive (locked) user accounts on a trusted system
Document id: USECKBRC00008606
Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080047721
US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080047721
Best regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 02:45 AM
08-29-2005 02:45 AM
Re: report to list locked accounts
Launch it for every user and check if they are locked ( grep alock=YES )
Rgds,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 03:24 AM
08-29-2005 03:24 AM
Re: report to list locked accounts
Default -shows locked accounts
expire -shows expired accounts and date
never -shows never activateds
user - shows lock code for user
user info - full info for user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 03:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 03:51 AM
08-29-2005 03:51 AM
Re: report to list locked accounts
looks good. i think i will try to put the user's real name as well.
thank you very much.
michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2005 05:37 AM
08-29-2005 05:37 AM
Re: report to list locked accounts
thanks, i had tried it before and it didn't work. it did this time. thanks.
michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 02:07 AM
09-12-2005 02:07 AM
Re: report to list locked accounts
syntax:
trusted_locked_accounts.sh ALL |
Example:
trusted_locked_accounts.sh ALL
-- Cycles through /etc/password
trusted_locked_accounts.sh jimbob
-- Checks login jimbob only
trusted_locked_accounts.sh !
-- Prompts user for input
Output also lists the command to unlock locked accounts.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 02:10 AM
09-12-2005 02:10 AM
Re: report to list locked accounts
#!/usr/bin/sh
#set -v
TRUSTED=0
NDNAME=`/usr/bin/uname -n`
retval=0
TRUSTED=`/usr/bin/grep '^root:\*:' /etc/passwd | wc -l`
if [ $TRUSTED -eq 1 ] ; then
echo "INFO0001: $NDNAME is a TRUSTED system"
else
retval=1
echo "INFO0002: $NDNAME is NOT a TRUSTED system"
fi
exit $retval