- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- account locked - query
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
12-12-2005 12:02 AM
12-12-2005 12:02 AM
lastb command gives the list of unsucessful login names.
Which command / file will give the list of locked account names. When the user tries to login through a locked account it will throw an message "Account locked - see system administrator" where this information is stored and how to view this.
Many thanks
S.Jagadesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2005 12:09 AM
12-12-2005 12:09 AM
Re: account locked - query
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2005 12:15 AM
12-12-2005 12:15 AM
Re: account locked - query
A combination if passwd -sa and lastb should give you record of who locked their account.
lastb lists bad logins and if the user is in there enough times, the user is certainly locked.
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
12-12-2005 12:20 AM
12-12-2005 12:20 AM
Re: account locked - query
All locked users will have LK in their passwd field.
one simple way could be
#cat /etc/passwd | grep LK
With Regards,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2005 12:22 AM
12-12-2005 12:22 AM
Re: account locked - query
No *one* file will give you that.
If trusted the following command run against *each* account will give you the lockout status
/usr/lbin/getprpw -m lockout user_name
If the result is non-zero then they're OK - if not, they're locked out.
If not trusted then if "*" is in the second field of the /etc/passwd file for a user_name - then they're locked out.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2005 01:29 AM
12-12-2005 01:29 AM
Solutionecho "USERS LOCKED BELOW:\r"
for USER in $(listusers | awk '{print $1}'|egrep -v "sshd|smbnull|tools|tbase")
do
lock_pos=$(/usr/lbin/getprpw -r -m lockout $USER)
user_name=$(grep $USER /etc/passwd|awk -F: '{print $5}')
if [ $lock_pos != "0000000" ]
then
echo "$USER $user_name $lock_pos"
fi
done
Hope this helps!!!
Good Luck,